changeset 57:14ffe87f27c6

netbeans/meth project
author jrose
date Wed, 25 May 2011 00:15:49 -0700
parents dbba306c0a08
children fc655b960f84
files netbeans/meth/build.xml netbeans/meth/nbproject/build-impl.xml netbeans/meth/nbproject/genfiles.properties netbeans/meth/nbproject/project.properties netbeans/meth/nbproject/project.xml netbeans/meth/test/sun/invoke/util/ValueConversionsTest.java netbeans/meth/test/sun/invoke/util/WrapperTest.java
diffstat 7 files changed, 66 insertions(+), 310 deletions(-) [+]
line wrap: on
line diff
--- a/netbeans/meth/build.xml	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/build.xml	Wed May 25 00:15:49 2011 -0700
@@ -10,7 +10,7 @@
 
     <import file="nbproject/build-impl.xml"/>
 
-    <target name="-pre-compile">
+    <target name="-pre-compile" if="build.verbose">
         <echo>Relevant attributes and properties:
     srcdir=         ${src.dir}
     destdir=        ${build.classes.dir}
@@ -30,6 +30,7 @@
     tempdir=        ${java.io.tmpdir}
     other attrs=    fork=yes includeantruntime=false
     platform.java=  ${platform.java}
+    java.home=      ${java.home}
     run.jvmargs=    ${run.jvmargs}
     run.test.cp=    ${run.test.classpath}
         </echo>
--- a/netbeans/meth/nbproject/build-impl.xml	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/nbproject/build-impl.xml	Wed May 25 00:15:49 2011 -0700
@@ -179,6 +179,7 @@
         <condition property="have.sources">
             <or>
                 <available file="${src.src.dir}"/>
+                <available file="${src.special-config-test-src.dir}"/>
             </or>
         </condition>
         <condition property="netbeans.home+have.tests">
@@ -235,6 +236,7 @@
     </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
         <fail unless="src.src.dir">Must set src.src.dir</fail>
+        <fail unless="src.special-config-test-src.dir">Must set src.special-config-test-src.dir</fail>
         <fail unless="test.src.dir">Must set test.src.dir</fail>
         <fail unless="test.tests-from-jdk.dir">Must set test.tests-from-jdk.dir</fail>
         <fail unless="build.dir">Must set build.dir</fail>
@@ -257,7 +259,7 @@
     </target>
     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.src.dir}" name="srcdir"/>
+            <attribute default="${src.src.dir}:${src.special-config-test-src.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -297,7 +299,7 @@
     </target>
     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.src.dir}" name="srcdir"/>
+            <attribute default="${src.src.dir}:${src.special-config-test-src.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -329,7 +331,7 @@
     </target>
     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.src.dir}" name="srcdir"/>
+            <attribute default="${src.src.dir}:${src.special-config-test-src.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -614,6 +616,13 @@
         <propertyfile file="${built-jar.properties}">
             <entry key="${basedir}" value=""/>
         </propertyfile>
+        <antcall target="-maybe-call-dep">
+            <param name="call.built.properties" value="${built-jar.properties}"/>
+            <param location="${project.indify}" name="call.subproject"/>
+            <param location="${project.indify}/build.xml" name="call.script"/>
+            <param name="call.target" value="jar"/>
+            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+        </antcall>
     </target>
     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
     <target depends="init" name="-check-automatic-build">
@@ -635,12 +644,13 @@
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.src.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.src.dir}:${src.special-config-test-src.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.special-config-test-src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
         </copy>
     </target>
     <target if="has.persistence.xml" name="-copy-persistence-xml">
@@ -661,7 +671,7 @@
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.src.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.src.dir}:${src.special-config-test-src.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -884,6 +894,9 @@
             <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
+            <fileset dir="${src.special-config-test-src.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
                 <include name="**/*.java"/>
             </fileset>
@@ -892,6 +905,9 @@
             <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
+            <fileset dir="${src.special-config-test-src.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
                 <include name="**/doc-files/**"/>
             </fileset>
@@ -1052,6 +1068,13 @@
         <propertyfile file="${built-clean.properties}">
             <entry key="${basedir}" value=""/>
         </propertyfile>
+        <antcall target="-maybe-call-dep">
+            <param name="call.built.properties" value="${built-clean.properties}"/>
+            <param location="${project.indify}" name="call.subproject"/>
+            <param location="${project.indify}/build.xml" name="call.script"/>
+            <param name="call.target" value="clean"/>
+            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+        </antcall>
     </target>
     <target depends="init" name="-do-clean">
         <delete dir="${build.dir}"/>
--- a/netbeans/meth/nbproject/genfiles.properties	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/nbproject/genfiles.properties	Wed May 25 00:15:49 2011 -0700
@@ -1,5 +1,5 @@
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=a09bc78f
-nbproject/build-impl.xml.script.CRC32=ee4e6a54
+nbproject/build-impl.xml.data.CRC32=0abfc8d0
+nbproject/build-impl.xml.script.CRC32=ccc4c3cb
 nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
--- a/netbeans/meth/nbproject/project.properties	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/nbproject/project.properties	Wed May 25 00:15:49 2011 -0700
@@ -1,6 +1,7 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=false
 annotation.processing.run.all.processors=true
+file.reference.netbeans-meth=.
 #
 # Some of these probably need to be pre-defined, in ../build.properties:
 #
@@ -8,14 +9,23 @@
   file.reference.openjdk-jdk7-folder=${file.reference.projects-folder}/hotspot/jdk7-integration
   file.reference.davinci-project-folder=${file.reference.projects-folder}/davinci
 
+# Pull tests from the JDK repository:
+test.tests-from-jdk.dir=${file.reference.davinci-project-folder.sources.jdk}
+# Not this:
+#test.tests-from-jdk.dir=${file.reference.davinci-project-folder.sources.jdk}/test
+# Reason:  We cannot have tests in java.lang subpackages.  Put them in test.java.lang.
+src.special-config-test-src.dir=test-special
+
 # e.g., ln -s ...davinci/sources/build/bsd-i586/j2sdk-image ~/env/JAVA7X_HOME
 file.reference.env-folder=${user.home}/env
+platforms.JDK_7X.home=${file.reference.env-folder}/JAVA7X_HOME
+platforms.JDK_7X64.home=${file.reference.env-folder}/JAVA7X64_HOME
+
 javac.processorpath=\
     ${javac.classpath}
   libs.junit_4.classpath=${file.reference.env-folder}/JUNIT4_JAR
-main.class=org.junit.runner.JUnitCore
+main.class=test.java.lang.invoke.RicochetTest
 mkdist.disabled=false
-  platforms.JDK_7X.home=${file.reference.env-folder}/JAVA7X_HOME
 
 # Possible overrides:
 #file.reference.davinci-project-folder.sources.jdk=${file.reference.openjdk-jdk7-folder}/jdk/src/share/classes
@@ -46,17 +56,17 @@
 dist.jar=${dist.dir}/meth.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
-excludes=**/Unmanaged/**
-#excludes=jdk/java/dyn/*Dynamic*
-#excludes=java/dyn/Anonymous*.java,java/dyn/*ConstantPool*.java,jdk/java/dyn/Anonymous*.java,links/**
+excludes=**/Unmanaged/**,**/JT*/**,sun/invoke/anon/**/*
+#excludes=sun/invoke/anon/**
 #file.reference.bsd-i586-classes=../davinci/sources/build/bsd-i586/classes
 file.reference.test-classes=build/test/classes
 file.reference.jdk-tests=${file.reference.davinci-project-folder.sources.jdk}/test
-includes=java/dyn/**/*.java,sun/dyn/**/*.java,test/java/dyn/**/*.java,java/lang/invoke/**/*.java,sun/invoke/**/*.java,test/java/lang/invoke/**/*.java,java/lang/BootstrapMethodError.java,java/lang/ClassValue.java,java/lang/IllegalAccessException.java,java/lang/NoSuchMethodException.java,java/lang/NoSuchFieldException.java
+includes=java/lang/invoke/*.java,sun/invoke/**/*.java,sun/invoke/**/*.java,test/java/lang/invoke/*.java,test/sun/invoke/**/*.java,Test*.java,java/lang/BootstrapMethodError.java,java/lang/ClassValue.java
+jdk.test.includes=test/java/lang/invoke/*.java,test/sun/invoke/**/*.java,
 #includes=**
 jar.compress=true
 javac.classpath=\
-    ${libs.junit_4.classpath}
+    ${reference.indify.jar}
 #    ${file.reference.bsd-i586-classes}
 # Space-separated list of extra javac options
 javac.compilerargs= -Xbootclasspath/p:${build.classes.dir} -Xlint:none ${javac.standalone.bcp}
@@ -94,6 +104,8 @@
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
 platform.active=JDK_7X
+project.indify=../../../../../Projects/indify
+reference.indify.jar=${project.indify}/dist/indify.jar
 # was on javac.classpath, run.classpath: ${reference.AnonymousClass.jar}
 #project.AnonymousClass=../anonk
 run.classpath=\
@@ -103,7 +115,7 @@
 # Space-separated list of JVM arguments used when running the project
 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
 # or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=-ea -esa ${config.run.jvmargs} ${meth.extra.jvmargs} -Xbootclasspath/p:"${run.classpath}:${libs.junit_4.classpath}" -Dbuild.test.classes.dir=${build.test.classes.dir}
+run.jvmargs=-ea -esa ${meth.extra.jvmargs} -Xbootclasspath/p:"${run.classpath}:${libs.junit_4.classpath}" -Dbuild.test.classes.dir=${build.test.classes.dir} ${config.run.jvmargs}
 #manual hack: override ${config.run.jvmargs} in ${config}.properties
 config.run.jvmargs =
 meth.extra.jvmargs = 
@@ -119,6 +131,8 @@
 #reference.langtools-javac.jar=${file.reference.openjdk-jdk7-folder}/langtools/dist/lib/javac.jar
 #reference.langtools-javac.jar=${file.reference.davinci-project-folder.sources.langtools}/dist/lib/javac.jar
 src.src.dir=${file.reference.davinci-project-folder.sources.jdk}/src/share/classes
+src.tests-from-jdk.dir=tests-from-jdk
+test.meth.dir=${file.reference.netbeans-meth}
 test.src.dir=test
 project.license=openjdk
 davinci.patch.name=meth
@@ -127,4 +141,3 @@
 platforms.JDK_7X.bootclasspath=${platforms.JDK_7X.home}/jre/lib/resources.jar:${platforms.JDK_7X.home}/jre/lib/rt.jar:${platforms.JDK_7X.home}/jre/lib/sunrsasign.jar:${platforms.JDK_7X.home}/jre/lib/jsse.jar:${platforms.JDK_7X.home}/jre/lib/jce.jar:${platforms.JDK_7X.home}/jre/lib/charsets.jar:${platforms.JDK_7X.home}/jre/classes:${platforms.JDK_7X.home}/jre/lib/ext/dnsns.jar:${platforms.JDK_7X.home}/jre/lib/ext/localedata.jar:${platforms.JDK_7X.home}/jre/lib/ext/sunjce_provider.jar:${platforms.JDK_7X.home}/jre/lib/ext/sunpkcs11.jar
 platforms.JDK_7X.compiler=modern
 platform.java=${platforms.JDK_7X.home}/bin/java
-test.tests-from-jdk.dir=${file.reference.davinci-project-folder.sources.jdk}
--- a/netbeans/meth/nbproject/project.xml	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/nbproject/project.xml	Wed May 25 00:15:49 2011 -0700
@@ -8,11 +8,22 @@
             <explicit-platform explicit-source-supported="true"/>
             <source-roots>
                 <root id="src.src.dir" name="JDK Source Packages"/>
+                <root id="src.special-config-test-src.dir" name="specially configured test sources"/>
             </source-roots>
             <test-roots>
                 <root id="test.src.dir"/>
                 <root id="test.tests-from-jdk.dir" name="JDK Test Packages"/>
             </test-roots>
         </data>
+        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+            <reference>
+                <foreign-project>indify</foreign-project>
+                <artifact-type>jar</artifact-type>
+                <script>build.xml</script>
+                <target>jar</target>
+                <clean-target>clean</clean-target>
+                <id>jar</id>
+            </reference>
+        </references>
     </configuration>
 </project>
--- a/netbeans/meth/test/sun/invoke/util/ValueConversionsTest.java	Fri Apr 22 01:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.invoke.util;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandles;
-import java.io.Serializable;
-import java.util.Arrays;
-import org.junit.Ignore;
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author jrose
- */
-public class ValueConversionsTest {
-
-    @Test
-    public void testUnbox() throws Throwable {
-        testUnbox(false);
-    }
-
-    @Test
-    public void testUnboxCast() throws Throwable {
-        testUnbox(true);
-    }
-
-    private void testUnbox(boolean doCast) throws Throwable {
-        //System.out.println("unbox");
-        for (Wrapper dst : Wrapper.values()) {
-            //System.out.println(dst);
-            for (Wrapper src : Wrapper.values()) {
-                testUnbox(doCast, dst, src);
-            }
-        }
-    }
-
-    private void testUnbox(boolean doCast, Wrapper dst, Wrapper src) throws Throwable {
-        boolean expectThrow = !doCast && !dst.isConvertibleFrom(src);
-        if (dst == Wrapper.OBJECT || src == Wrapper.OBJECT)  return;  // must have prims
-        if (dst == Wrapper.OBJECT)
-            expectThrow = false;  // everything (even VOID==null here) converts to OBJECT
-        try {
-            for (int n = -5; n < 10; n++) {
-                Object box = src.wrap(n);
-                switch (src) {
-                    case VOID:   assertEquals(box, null); break;
-                    case OBJECT: box = box.toString(); break;
-                    case SHORT:  assertEquals(box.getClass(), Short.class); break;
-                    default:     assertEquals(box.getClass(), src.wrapperType()); break;
-                }
-                MethodHandle unboxer;
-                if (doCast)
-                    unboxer = ValueConversions.unboxCast(dst.primitiveType());
-                else
-                    unboxer = ValueConversions.unbox(dst.primitiveType());
-                Object expResult = (box == null) ? dst.zero() : dst.wrap(box);
-                Object result = null;
-                switch (dst) {
-                    case INT:     result = (int)     unboxer.invokeExact(box); break;
-                    case LONG:    result = (long)    unboxer.invokeExact(box); break;
-                    case FLOAT:   result = (float)   unboxer.invokeExact(box); break;
-                    case DOUBLE:  result = (double)  unboxer.invokeExact(box); break;
-                    case CHAR:    result = (char)    unboxer.invokeExact(box); break;
-                    case BYTE:    result = (byte)    unboxer.invokeExact(box); break;
-                    case SHORT:   result = (short)   unboxer.invokeExact(box); break;
-                    case OBJECT:  result = (Object)  unboxer.invokeExact(box); break;
-                    case BOOLEAN: result = (boolean) unboxer.invokeExact(box); break;
-                    case VOID:    result = null;     unboxer.invokeExact(box); break;
-                }
-                if (expectThrow) {
-                    expResult = "(need an exception)";
-                }
-                assertEquals("(doCast,expectThrow,dst,src,n,box)="+Arrays.asList(doCast,expectThrow,dst,src,n,box),
-                             expResult, result);
-            }
-        } catch (RuntimeException ex) {
-            if (expectThrow)  return;
-            System.out.println("Unexpected throw for (doCast,expectThrow,dst,src)="+Arrays.asList(doCast,expectThrow,dst,src));
-            throw ex;
-        }
-    }
-
-    @Test
-    public void testUnboxRaw() throws Throwable {
-        //System.out.println("unboxRaw");
-        for (Wrapper w : Wrapper.values()) {
-            if (w == Wrapper.OBJECT)  continue;  // skip this; no raw form
-            //System.out.println(w);
-            for (int n = -5; n < 10; n++) {
-                Object box = w.wrap(n);
-                long expResult = w.unwrapRaw(box);
-                Object box2 = w.wrapRaw(expResult);
-                assertEquals(box, box2);
-                MethodHandle unboxer = ValueConversions.unboxRaw(w.primitiveType());
-                long result = -1;
-                switch (w) {
-                    case INT:     result = (int)  unboxer.invokeExact(box); break;
-                    case LONG:    result = (long) unboxer.invokeExact(box); break;
-                    case FLOAT:   result = (int)  unboxer.invokeExact(box); break;
-                    case DOUBLE:  result = (long) unboxer.invokeExact(box); break;
-                    case CHAR:    result = (int)  unboxer.invokeExact(box); break;
-                    case BYTE:    result = (int)  unboxer.invokeExact(box); break;
-                    case SHORT:   result = (int)  unboxer.invokeExact(box); break;
-                    case BOOLEAN: result = (int)  unboxer.invokeExact(box); break;
-                    case VOID:    result = (int)  unboxer.invokeExact(box); break;
-                }
-                assertEquals("(w,n,box)="+Arrays.asList(w,n,box),
-                             expResult, result);
-            }
-        }
-    }
-
-    @Test
-    public void testBox() throws Throwable {
-        //System.out.println("box");
-        for (Wrapper w : Wrapper.values()) {
-            if (w == Wrapper.VOID)  continue;  // skip this; no unboxed form
-            //System.out.println(w);
-            for (int n = -5; n < 10; n++) {
-                Object box = w.wrap(n);
-                MethodHandle boxer = ValueConversions.box(w.primitiveType());
-                Object expResult = box;
-                Object result = null;
-                switch (w) {
-                    case INT:     result = boxer.invokeExact((int)n); break;
-                    case LONG:    result = boxer.invokeExact((long)n); break;
-                    case FLOAT:   result = boxer.invokeExact((float)n); break;
-                    case DOUBLE:  result = boxer.invokeExact((double)n); break;
-                    case CHAR:    result = boxer.invokeExact((char)n); break;
-                    case BYTE:    result = boxer.invokeExact((byte)n); break;
-                    case SHORT:   result = boxer.invokeExact((short)n); break;
-                    case OBJECT:  result = boxer.invokeExact((Object)n); break;
-                    case BOOLEAN: result = boxer.invokeExact((n & 1) != 0); break;
-                }
-                assertEquals("(dst,src,n,box)="+Arrays.asList(w,w,n,box),
-                             expResult, result);
-            }
-        }
-    }
-
-    @Test
-    public void testBoxRaw() throws Throwable {
-        //System.out.println("boxRaw");
-        for (Wrapper w : Wrapper.values()) {
-            if (w == Wrapper.VOID)  continue;  // skip this; no unboxed form
-            if (w == Wrapper.OBJECT)  continue;  // skip this; no raw form
-            //System.out.println(w);
-            for (int n = -5; n < 10; n++) {
-                Object box = w.wrap(n);
-                long   raw = w.unwrapRaw(box);
-                Object expResult = box;
-                MethodHandle boxer = ValueConversions.boxRaw(w.primitiveType());
-                Object result = null;
-                switch (w) {
-                case INT:     result = boxer.invokeExact((int)raw); break;
-                case LONG:    result = boxer.invokeExact(raw); break;
-                case FLOAT:   result = boxer.invokeExact((int)raw); break;
-                case DOUBLE:  result = boxer.invokeExact(raw); break;
-                case CHAR:    result = boxer.invokeExact((int)raw); break;
-                case BYTE:    result = boxer.invokeExact((int)raw); break;
-                case SHORT:   result = boxer.invokeExact((int)raw); break;
-                case BOOLEAN: result = boxer.invokeExact((int)raw); break;
-                }
-                assertEquals("(dst,src,n,box)="+Arrays.asList(w,w,n,box),
-                             expResult, result);
-            }
-        }
-    }
-
-    @Test
-    public void testReboxRaw() throws Throwable {
-        //System.out.println("reboxRaw");
-        for (Wrapper w : Wrapper.values()) {
-            Wrapper pw = Wrapper.forPrimitiveType(w.rawPrimitiveType());
-            if (w == Wrapper.VOID)  continue;  // skip this; no unboxed form
-            if (w == Wrapper.OBJECT)  continue;  // skip this; no raw form
-            //System.out.println(w);
-            for (int n = -5; n < 10; n++) {
-                Object box = w.wrap(n);
-                Object raw = pw.wrap(w.unwrapRaw(box));
-                Object expResult = box;
-                MethodHandle boxer = ValueConversions.rebox(w.primitiveType());
-                Object result = null;
-                switch (w) {
-                case INT:     result = boxer.invokeExact(raw); break;
-                case LONG:    result = boxer.invokeExact(raw); break;
-                case FLOAT:   result = boxer.invokeExact(raw); break;
-                case DOUBLE:  result = boxer.invokeExact(raw); break;
-                case CHAR:    result = boxer.invokeExact(raw); break;
-                case BYTE:    result = boxer.invokeExact(raw); break;
-                case SHORT:   result = boxer.invokeExact(raw); break;
-                case BOOLEAN: result = boxer.invokeExact(raw); break;
-                }
-                assertEquals("(dst,src,n,box)="+Arrays.asList(w,w,n,box),
-                             expResult, result);
-            }
-        }
-    }
-
-    @Test
-    public void testCast() throws Throwable {
-        //System.out.println("cast");
-        Class<?>[] types = { Object.class, Serializable.class, String.class, Number.class, Integer.class };
-        Object[] objects = { new Object(), Boolean.FALSE,      "hello",      (Long)12L,    (Integer)6    };
-        for (Class<?> dst : types) {
-            MethodHandle caster = ValueConversions.cast(dst);
-            assertEquals(caster.type(), ValueConversions.identity().type());
-            for (Object obj : objects) {
-                Class<?> src = obj.getClass();
-                boolean canCast;
-                if (dst.isInterface()) {
-                    canCast = true;
-                } else {
-                    canCast = dst.isAssignableFrom(src);
-                    assertEquals(canCast, dst.isInstance(obj));
-                }
-                //System.out.println("obj="+obj+" <: dst="+dst);
-                try {
-                    Object result = caster.invokeExact(obj);
-                    if (canCast)
-                        assertEquals(obj, result);
-                    else
-                        assertEquals("cast should not have succeeded", dst, obj);
-                } catch (ClassCastException ex) {
-                    if (canCast)
-                        throw ex;
-                }
-            }
-        }
-    }
-
-    @Test
-    public void testIdentity() throws Throwable {
-        //System.out.println("identity");
-        MethodHandle id = ValueConversions.identity();
-        Object expResult = "foo";
-        Object result = id.invokeExact(expResult);
-        // compiler bug:  ValueConversions.identity().invokeExact("bar");
-        assertEquals(expResult, result);
-    }
-
-    @Test
-    public void testVarargsArray() throws Throwable {
-        //System.out.println("varargsArray");
-        for (int nargs = 0; nargs <= 250; nargs += 1+(nargs/17)) {
-            if (nargs > 9)  break;  // FIXME
-            MethodHandle target = ValueConversions.varargsArray(nargs);
-            Object[] args = new Object[nargs];
-            for (int i = 0; i < nargs; i++)
-                args[i] = "#"+i;
-            Object res = target.invokeWithArguments(args);
-            assertArrayEquals(args, (Object[])res);
-        }
-    }
-
-    @Test
-    public void testVarargsList() throws Throwable {
-        //System.out.println("varargsList");
-        for (int nargs = 0; nargs <= 250; nargs += 1+(nargs/17)) {
-            if (nargs > 9)  break;  // FIXME
-            MethodHandle target = ValueConversions.varargsList(nargs);
-            Object[] args = new Object[nargs];
-            for (int i = 0; i < nargs; i++)
-                args[i] = "#"+i;
-            Object res = target.invokeWithArguments(args);
-            assertEquals(Arrays.asList(args), res);
-        }
-    }
-}
\ No newline at end of file
--- a/netbeans/meth/test/sun/invoke/util/WrapperTest.java	Fri Apr 22 01:53:20 2011 -0700
+++ b/netbeans/meth/test/sun/invoke/util/WrapperTest.java	Wed May 25 00:15:49 2011 -0700
@@ -49,7 +49,7 @@
         assertLocal(  asWrapperType(WTYPE) == WTYPE);
 
         assertLocal(forWrapperType(Object.class) == OBJECT);
-        assertLocal(forWrapperType(Iterable.class) == OBJECT);
+        //assertLocal(forWrapperType(Iterable.class) == OBJECT);
         assertLocal(forWrapperType(Void.class) == VOID);
         assertLocal(forWrapperType(Integer.class) == INT);
         assertLocal(forPrimitiveType(void.class) == VOID);