[gf-corba-v3-mirror~gfv31-master:691] Added tag VERSION-3.1.0-b033-dev for changeset 7c221f22848c
- From: hvilekar@kenai.com
- To: commits@gf-corba-v3-mirror.kenai.com
- Subject: [gf-corba-v3-mirror~gfv31-master:691] Added tag VERSION-3.1.0-b033-dev for changeset 7c221f22848c
- Date: Mon, 6 Feb 2012 22:49:00 +0000
Project: gf-corba-v3-mirror
Repository: gfv31-master
Revision: 691
Author: hvilekar
Date: 2012-02-06 22:48:24 UTC
Link:
Log Message:
------------
Fixed GLASSFISH-18310
Added tag VERSION-3.1.0-b033-dev for changeset 7c221f22848c
Revisions:
----------
690
691
Modified Paths:
---------------
make/build.properties
nbproject/private/private.xml
orblib/src/share/classes/com/sun/corba/se/impl/orbutil/copyobject/DefaultClassCopierFactories.java
.hgtags
Diffs:
------
diff -r f5b3abe245af -r 7c221f22848c make/build.properties
--- a/make/build.properties Wed Dec 07 17:23:33 2011 -0800
+++ b/make/build.properties Mon Feb 06 14:47:37 2012 -0800
@@ -1,9 +1,9 @@
-#Tue, 06 Dec 2011 09:15:20 -0800
+#Mon, 06 Feb 2012 13:50:45 -0800
#Sun Jul 10 19:14:18 PDT 2011
corba.update.version=0
management-api.groupid=org.glassfish.external
aqute.repository=http\://www.aqute.biz/repo
-build.int=032
+build.int=033
gmbal.version=3.1.0-b001
gmbal.artifactid=gmbal
gmbal.groupid=org.glassfish.gmbal
diff -r f5b3abe245af -r 7c221f22848c nbproject/private/private.xml
--- a/nbproject/private/private.xml Wed Dec 07 17:23:33 2011 -0800
+++ b/nbproject/private/private.xml Mon Feb 06 14:47:37 2012 -0800
@@ -7,6 +7,10 @@
<line>546</line>
</file>
</editor-bookmarks>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
+
<file>file:/net/qm2.us.oracle.com/export/repo/gf-corba-v3-mirror-gfv31-master/make/src-build.xml</file>
+
<file>file:/net/qm2.us.oracle.com/export/repo/gf-corba-v3-mirror-gfv31-master/make/modules.xml</file>
+ </open-files>
</project-private>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
diff -r f5b3abe245af -r 7c221f22848c
orblib/src/share/classes/com/sun/corba/se/impl/orbutil/copyobject/DefaultClassCopierFactories.java
---
a/orblib/src/share/classes/com/sun/corba/se/impl/orbutil/copyobject/DefaultClassCopierFactories.java
Wed Dec 07 17:23:33 2011 -0800
+++
b/orblib/src/share/classes/com/sun/corba/se/impl/orbutil/copyobject/DefaultClassCopierFactories.java
Mon Feb 06 14:47:37 2012 -0800
@@ -37,136 +37,138 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
-
package com.sun.corba.se.impl.orbutil.copyobject;
-import java.lang.reflect.Method ;
-import java.lang.reflect.Modifier ;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
-import java.util.Map ;
+import java.util.Map;
-import com.sun.corba.se.spi.orbutil.copyobject.ReflectiveCopyException ;
-import com.sun.corba.se.spi.orbutil.misc.WeakHashMapSafeReadLock ;
+import java.security.PrivilegedAction;
+import java.security.AccessController;
-public abstract class DefaultClassCopierFactories
-{
+import com.sun.corba.se.spi.orbutil.copyobject.ReflectiveCopyException;
+import com.sun.corba.se.spi.orbutil.misc.WeakHashMapSafeReadLock;
+
+public abstract class DefaultClassCopierFactories {
// Note that the FastCache is NOT a weak or soft
// reference based cache, so it can hold onto
// references to classes indefinitely, pinning ClassLoader
// instances in memory. Until this is fixed, FastCache is
// for testing only.
- public static final boolean USE_FAST_CACHE = false ;
- private DefaultClassCopierFactories() {}
+ public static final boolean USE_FAST_CACHE = false;
- /** Create a ClassCopierFactory that handles arrays. This
- * ClassCopierFactory will return null on a get call if the
- * class is not an array.
- */
- public static ClassCopierFactory makeArrayClassCopierFactory(
- ClassCopierFactory ccf )
- {
- return new ClassCopierFactoryArrayImpl( ccf ) ;
+ private DefaultClassCopierFactories() {
}
- private static final Class<?>[] SAFE_TO_COPY = new Class<?>[] {
- java.util.TimeZone.class,
- java.lang.Throwable.class,
- java.lang.reflect.Proxy.class
- } ;
+ /**
+ * Create a ClassCopierFactory that handles arrays. This
ClassCopierFactory
+ * will return null on a get call if the class is not an array.
+ */
+ public static ClassCopierFactory makeArrayClassCopierFactory(
+ ClassCopierFactory ccf) {
+ return new ClassCopierFactoryArrayImpl(ccf);
+ }
+ private static final Class<?>[] SAFE_TO_COPY = new Class<?>[]{
+ java.util.TimeZone.class,
+ java.lang.Throwable.class,
+ java.lang.reflect.Proxy.class
+ };
- public static ClassCopierFactory makeOrdinaryClassCopierFactory(
- final PipelineClassCopierFactory ccf )
- {
- return new ClassCopierFactory()
- {
- public ClassCopier getClassCopier( Class<?> cls ) throws
ReflectiveCopyException
- {
- if (notCopyable( cls )) {
- return DefaultClassCopiers.getErrorClassCopier() ;
- } else {
- return new ClassCopierOrdinaryImpl( ccf, cls ) ;
- }
- }
+ public static ClassCopierFactory makeOrdinaryClassCopierFactory(
+ final PipelineClassCopierFactory ccf) {
+ return new ClassCopierFactory() {
- // Returns true if class is (specially) known to be safe
- // to copy, even if notCopyable(cls) is true.
- private boolean safe( Class cls )
- {
- for (Class klass : SAFE_TO_COPY) {
- if (cls == klass) {
- return true ;
- }
- }
+ public ClassCopier getClassCopier(Class<?> cls) throws
ReflectiveCopyException {
+ if (notCopyable(cls)) {
+ return DefaultClassCopiers.getErrorClassCopier();
+ } else {
+ return new ClassCopierOrdinaryImpl(ccf, cls);
+ }
+ }
- return false ;
- }
+ // Returns true if class is (specially) known to be safe
+ // to copy, even if notCopyable(cls) is true.
+ private boolean safe(Class cls) {
+ for (Class klass : SAFE_TO_COPY) {
+ if (cls == klass) {
+ return true;
+ }
+ }
- // Scan the methods in cls and all its superclasses (except
- // Object!) to see if finalize is defined, or if there are
- // any native methods. Classes with such methods are not
copyable,
- // except for a few known classes that ARE safe to copy,
- // and cause this method to return true. If there are not
- // problematic methods, return false and allow the copy
- // (at this level: references to non-copyable objects will
- // cause ReflectiveCopyException to be thrown where ever they
- // occur).
- private boolean notCopyable( Class<?> cls ) {
- Class<?> current = cls ;
- while (current != Object.class) {
- if (safe(current)) {
+ return false;
+ }
+
+ // Scan the methods in cls and all its superclasses (except
+ // Object!) to see if finalize is defined, or if there are
+ // any native methods. Classes with such methods are not
copyable,
+ // except for a few known classes that ARE safe to copy,
+ // and cause this method to return true. If there are not
+ // problematic methods, return false and allow the copy
+ // (at this level: references to non-copyable objects will
+ // cause ReflectiveCopyException to be thrown where ever they
+ // occur).
+ private boolean notCopyable(Class<?> cls) {
+ Class<?> current = cls;
+ Method[] methods ;
+ while (current != Object.class) {
+ if (safe(current)) {
return false;
}
+ if (System.getSecurityManager() == null) {
+ methods = current.getDeclaredMethods();
+ } else {
+ final Class<?> _current = current;
+ methods = (Method[])
AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return _current.getDeclaredMethods();
+ }
+ });
+ }
+ for (Method m : methods) {
+ if ((m.getName().equals("finalize"))
+ || Modifier.isNative(m.getModifiers())) {
+ return true;
+ }
+ }
- for (Method m : current.getDeclaredMethods() ) {
- if ((m.getName().equals( "finalize" )) ||
- Modifier.isNative(m.getModifiers()) ) {
- return true ;
- }
- }
+ current = current.getSuperclass();
+ }
- current = current.getSuperclass() ;
- }
-
- return false ;
- }
- } ;
+ return false;
+ }
+ };
}
- public static CachingClassCopierFactory makeCachingClassCopierFactory( )
- {
- return new CachingClassCopierFactory()
- {
- private Map<Class<?>,ClassCopier> cache = USE_FAST_CACHE ?
- new FastCache<Class<?>,ClassCopier>(
- new WeakHashMapSafeReadLock<Class<?>,ClassCopier>() ) :
- new WeakHashMapSafeReadLock<Class<?>,ClassCopier>() ;
+ public static CachingClassCopierFactory makeCachingClassCopierFactory() {
+ return new CachingClassCopierFactory() {
- public void put( Class<?> cls, ClassCopier copier )
- {
- cache.put( cls, copier ) ;
- }
+ private Map<Class<?>, ClassCopier> cache = USE_FAST_CACHE
+ ? new FastCache<Class<?>, ClassCopier>(
+ new WeakHashMapSafeReadLock<Class<?>, ClassCopier>())
+ : new WeakHashMapSafeReadLock<Class<?>, ClassCopier>();
- public ClassCopier getClassCopier( Class<?> cls )
- {
- return cache.get(cls) ;
- }
- };
- }
-
- public static ClassCopierFactory getNullClassCopierFactory()
- {
- return new ClassCopierFactory()
- {
- public ClassCopier getClassCopier( Class cls )
- {
- return null ;
- }
- } ;
+ public void put(Class<?> cls, ClassCopier copier) {
+ cache.put(cls, copier);
+ }
+
+ public ClassCopier getClassCopier(Class<?> cls) {
+ return cache.get(cls);
+ }
+ };
}
- public static PipelineClassCopierFactory getPipelineClassCopierFactory()
- {
- return new ClassCopierFactoryPipelineImpl() ;
+ public static ClassCopierFactory getNullClassCopierFactory() {
+ return new ClassCopierFactory() {
+
+ public ClassCopier getClassCopier(Class cls) {
+ return null;
+ }
+ };
+ }
+
+ public static PipelineClassCopierFactory getPipelineClassCopierFactory()
{
+ return new ClassCopierFactoryPipelineImpl();
}
}
diff -r 7c221f22848c -r d6701207a54f .hgtags
--- a/.hgtags Mon Feb 06 14:47:37 2012 -0800
+++ b/.hgtags Mon Feb 06 14:48:24 2012 -0800
@@ -126,3 +126,4 @@
3f50d58d1050163759dcf6e56a2b497a5fa9c3e5 VERSION-3.1.0-b029
97bd854f6a1cb43f6476f5e1bd372f0cc7314536 VERSION-3.1.0-b030
a1ffa58c0b405165f33b99456b8e5c186e0c1f3c VERSION-3.1.0-b032
+7c221f22848c1d0ef27439bafa39a16792cc8923 VERSION-3.1.0-b033-dev
|
[gf-corba-v3-mirror~gfv31-master:691] Added tag VERSION-3.1.0-b033-dev for changeset 7c221f22848c |
hvilekar | 02/06/2012 |





