? org/omg/CORBA/ValueBaseHelper.java
? org/omg/CORBA/ValueBaseHolder.java
? org/omg/CORBA/portable/ValueBase.java
Index: gnu/CORBA/gnuAny.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/CORBA/gnuAny.java,v
retrieving revision 1.2
diff -u -r1.2 gnuAny.java
--- gnu/CORBA/gnuAny.java	22 May 2005 12:20:58 -0000	1.2
+++ gnu/CORBA/gnuAny.java	25 May 2005 16:51:26 -0000
@@ -52,7 +52,6 @@
 import org.omg.CORBA.IntHolder;
 import org.omg.CORBA.LongHolder;
 import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.NO_IMPLEMENT;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.ObjectHolder;
 import org.omg.CORBA.Principal;
@@ -63,6 +62,7 @@
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.TypeCodeHolder;
 import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.ValueBaseHolder;
 import org.omg.CORBA.portable.Streamable;
 
 import java.io.IOException;
@@ -265,11 +265,26 @@
     return ((TypeCodeHolder) has).value;
   }
 
+  /**
+   * Extract the stored value type.
+   *
+   * @return the previously stored value type.
+   *
+   * @throws BAD_OPERATION if the Any contains something different.
+   *
+   * @see org.omg.CORBA.portable.ValueBase
+   */
   public Serializable extract_Value()
                              throws BAD_OPERATION
   {
-    /**@todo Implement this org.omg.CORBA.Any abstract method*/
-    throw new java.lang.UnsupportedOperationException("Method extract_Value() not yet implemented.");
+    try
+      {
+        return ((ValueBaseHolder) has).value;
+      }
+    catch (ClassCastException ex)
+      {
+        return new BAD_OPERATION("Value type expected");
+      }
   }
 
   /** {@inheritDoc} */
@@ -474,17 +489,18 @@
   /** {@inheritDoc} */
   public void insert_Value(Serializable x, TypeCode typecode)
   {
-    resetTypes();
-
-    /**@todo Implement this org.omg.CORBA.Any abstract method*/
+    type(typecode);
+    insert_Value(x);
   }
 
   /** {@inheritDoc} */
   public void insert_Value(Serializable x)
   {
     resetTypes();
-
-    /**@todo Implement this org.omg.CORBA.Any abstract method*/
+    if (has instanceof ValueBaseHolder)
+      ((ValueBaseHolder) has).value = x;
+    else
+      has = new ValueBaseHolder(x);
   }
 
   /**
@@ -710,14 +726,14 @@
           {
             has = holderFactory.createHolder(a_type);
             if (has == null)
-            {
-              // Use the Universal Holder that reads till the end of stream.
-              // This works with the extract/insert pair of the typical
-              // Helper.
-              cdrBufOutput buffer = new cdrBufOutput();
-              buffer.setOrb(orb);
-              has = new universalHolder(buffer);
-            }
+              {
+                // Use the Universal Holder that reads till the end of stream.
+                // This works with the extract/insert pair of the typical
+                // Helper.
+                cdrBufOutput buffer = new cdrBufOutput();
+                buffer.setOrb(orb);
+                has = new universalHolder(buffer);
+              }
           }
         type(a_type);
         has._read(input);
@@ -799,4 +815,4 @@
     typecode = null;
     xKind = -1;
   }
-}
+}
\ No newline at end of file
