From: <pcm...@us...> - 2008-06-04 20:57:53
|
Revision: 859 http://javapathfinder.svn.sourceforge.net/javapathfinder/?rev=859&view=rev Author: pcmehlitz Date: 2008-06-04 13:57:46 -0700 (Wed, 04 Jun 2008) Log Message: ----------- * the sun.misc.SharedSecrets / Java 6 "Enum hack" - this is a change we would rather like to get rid of ASAP. From sun.misc.SharedSecrets: This is a backdoor mechanism in Java 6 to allow (some sort of) controlled access to internals between packages, using sun.misc.* interfaces (e.g. JavaLangAccess) that are anonymously instantiated within the exporting package (e.g. java.lang), and obtained via SharedSecrets, which in turn obtains the instances from sun.misc.Unsafe. For most packages these interface objects are created on demand by static init of some key classes of these packages that call the SharedSecrets setters (except for JavaLangAccess and JavaNetAccess) Since this is used from within the standard libraries of Java 6, we need some sort of support, but we don't want to break Java 1.5 yet by introducing lots of Java 6 dependencies, which would force us to duplicate their code even though it might be pure Java (like java.io.Console). This is a can of worms, which we only open partially to support EnumSets for both Java 1.5 and 6. We make the cut at java.* packages - if the backdoor interfaces/types require anything outside sun.* packages, we leave it out. All of this is hopefully going away when we drop Java 1.5 support, and is to be replaced by some native peers providing the required native calls Modified Paths: -------------- branches/v5/env/jpf/java/lang/Class.java branches/v5/env/jpf/java/lang/System.java branches/v5/env/jpf/java/lang/Thread.java branches/v5/env/jpf/java/lang/reflect/Method.java branches/v5/env/jpf/sun/misc/Unsafe.java branches/v5/env/jvm/gov/nasa/jpf/jvm/JPF_sun_misc_Unsafe.java Added Paths: ----------- branches/v5/env/jpf/java/lang/annotation/ branches/v5/env/jpf/java/lang/annotation/Inherited.java branches/v5/env/jpf/java/lang/annotation/Retention.java branches/v5/env/jpf/sun/misc/JavaIOAccess.java branches/v5/env/jpf/sun/misc/JavaIODeleteOnExitAccess.java branches/v5/env/jpf/sun/misc/JavaIOFileDescriptorAccess.java branches/v5/env/jpf/sun/misc/JavaLangAccess.java branches/v5/env/jpf/sun/misc/JavaNetAccess.java branches/v5/env/jpf/sun/misc/SharedSecrets.java branches/v5/env/jpf/sun/nio/ branches/v5/env/jpf/sun/nio/ch/ branches/v5/env/jpf/sun/nio/ch/Interruptible.java branches/v5/env/jpf/sun/reflect/ branches/v5/env/jpf/sun/reflect/ConstantPool.java branches/v5/env/jpf/sun/reflect/annotation/ branches/v5/env/jpf/sun/reflect/annotation/AnnotationType.java This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |