harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r1043883 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/beans/src/main/java/java/beans/beancontext/ classlib/modules/security/src/main/java/common/java/security/ drlvm/ jdktools/
Date Thu, 09 Dec 2010 10:19:21 GMT
Author: hindessm
Date: Thu Dec  9 10:19:20 2010
New Revision: 1043883

URL: http://svn.apache.org/viewvc?rev=1043883&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@1043349:

  r1043349 | clraychen | 2010-12-08 10:56:14 +0000 (Wed, 08 Dec 2010) | 1 line
  
  Apply another fix for HARMONY-6661: Synchonrize on mutable field in Permissions.java readObject()
is only reachable by one thread, so remove unnecessary synchronized block

Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
    harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
    harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
    harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/UnresolvedPermissionCollection.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  9 10:19:20 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506
+/harmony/enhanced/java/trunk:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506,1043349
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  9 10:19:20 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506
+/harmony/enhanced/java/trunk/classlib:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506,1043349
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  9 10:19:20 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506,1043349
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java?rev=1043883&r1=1043882&r2=1043883&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
Thu Dec  9 10:19:20 2010
@@ -1070,9 +1070,7 @@ public class BeanContextServicesSupport 
 
         ois.defaultReadObject();
 
-        synchronized (bcsListeners) {
-            deserialize(ois, bcsListeners);
-        }
+        deserialize(ois, bcsListeners);
     }
 
 }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java?rev=1043883&r1=1043882&r2=1043883&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
Thu Dec  9 10:19:20 2010
@@ -1295,9 +1295,7 @@ public class BeanContextSupport extends 
             readChildren(ois);
         }
 
-        synchronized (bcmListeners) {
-            deserialize(ois, bcmListeners);
-        }
+        deserialize(ois, bcmListeners);
     }
 
     /*

Modified: harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java?rev=1043883&r1=1043882&r2=1043883&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/BasicPermissionCollection.java
Thu Dec  9 10:19:20 2010
@@ -197,19 +197,19 @@ final class BasicPermissionCollection ex
         ObjectInputStream.GetField fields = in.readFields();
 
         items = new HashMap<String, Permission>();
-        synchronized (this) {
-            permClass = (Class<? extends Permission>)fields.get("permClass", null);
//$NON-NLS-1$
-            items.putAll((Hashtable<String, Permission>) fields.get(
-                    "permissions", new Hashtable<String, Permission>())); //$NON-NLS-1$
-            for (Iterator<Permission> iter = items.values().iterator(); iter.hasNext();)
{
-                if (iter.next().getClass() != permClass) {
-                    throw new InvalidObjectException(Messages.getString("security.24"));
//$NON-NLS-1$
-                }
-            }
-            allEnabled = fields.get("all_allowed", false); //$NON-NLS-1$
-            if (allEnabled && !items.containsKey("*")) { //$NON-NLS-1$
-                throw new InvalidObjectException(Messages.getString("security.25")); //$NON-NLS-1$
+        permClass = (Class<? extends Permission>) fields.get("permClass", null); //$NON-NLS-1$
+        items.putAll((Hashtable<String, Permission>) fields.get(
+                "permissions", new Hashtable<String, Permission>())); //$NON-NLS-1$
+        for (Iterator<Permission> iter = items.values().iterator(); iter
+                .hasNext();) {
+            if (iter.next().getClass() != permClass) {
+                throw new InvalidObjectException(
+                        Messages.getString("security.24")); //$NON-NLS-1$
             }
         }
+        allEnabled = fields.get("all_allowed", false); //$NON-NLS-1$
+        if (allEnabled && !items.containsKey("*")) { //$NON-NLS-1$
+            throw new InvalidObjectException(Messages.getString("security.25")); //$NON-NLS-1$
+        }
     }
 }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/UnresolvedPermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/UnresolvedPermissionCollection.java?rev=1043883&r1=1043882&r2=1043883&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/UnresolvedPermissionCollection.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/security/src/main/java/common/java/security/UnresolvedPermissionCollection.java
Thu Dec  9 10:19:20 2010
@@ -174,24 +174,20 @@ final class UnresolvedPermissionCollecti
         ObjectInputStream.GetField fields = in.readFields();
         Map permissions = (Map)fields.get("permissions", null); //$NON-NLS-1$
         klasses = new HashMap();
-        synchronized (klasses) {
-            for (Iterator iter = permissions.entrySet().iterator(); iter
-            	.hasNext();) {
-            	Map.Entry entry = (Map.Entry) iter.next();
-	            String key = (String) entry.getKey();
-	            Collection values = (Collection) entry.getValue();
+        for (Iterator iter = permissions.entrySet().iterator(); iter.hasNext();) {
+            Map.Entry entry = (Map.Entry) iter.next();
+            String key = (String) entry.getKey();
+            Collection values = (Collection) entry.getValue();
 
-	            for (Iterator iterator = values.iterator(); iterator.hasNext();) {
-	                UnresolvedPermission element =
-	                        (UnresolvedPermission) iterator.next();
+            for (Iterator iterator = values.iterator(); iterator.hasNext();) {
+                UnresolvedPermission element = (UnresolvedPermission) iterator.next();
 
-	                if (!element.getName().equals(key)) {
-	                    throw new InvalidObjectException(
-	                        Messages.getString("security.22")); //$NON-NLS-1$
-	                }
-	            }
-	            klasses.put(key, new HashSet(values));
-	        }
+                if (!element.getName().equals(key)) {
+                    throw new InvalidObjectException(
+                            Messages.getString("security.22")); //$NON-NLS-1$
+                }
+            }
+            klasses.put(key, new HashSet(values));
         }
     }
 }
\ No newline at end of file

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  9 10:19:20 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506
+/harmony/enhanced/java/trunk/drlvm:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506,1043349
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  9 10:19:20 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506
+/harmony/enhanced/java/trunk/jdktools:929253-1029636,1029773,1029853,1030005,1033407,1035930,1038506,1043349
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message