activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1070876 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
Date Tue, 15 Feb 2011 13:02:59 GMT
Author: chirino
Date: Tue Feb 15 13:02:59 2011
New Revision: 1070876

URL: http://svn.apache.org/viewvc?rev=1070876&view=rev
Log:
Fixes AMQ-3181

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java?rev=1070876&r1=1070875&r2=1070876&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
Tue Feb 15 13:02:59 2011
@@ -38,26 +38,30 @@ import org.apache.activemq.command.Activ
 
 
 public final class IntrospectionSupport {
-	
-	static {
-		// Add Spring and ActiveMQ specific property editors
-		String[] additionalPath = new String[] {
-				"org.springframework.beans.propertyeditors",
-				"org.apache.activemq.util" };
-		synchronized (PropertyEditorManager.class) {
-		    String[] existingSearchPath = PropertyEditorManager.getEditorSearchPath();
-		    String[] newSearchPath = (String[]) Array.newInstance(String.class,
-		            existingSearchPath.length + additionalPath.length);
-		    System.arraycopy(existingSearchPath, 0,
-		            newSearchPath, 0,
-		            existingSearchPath.length);
-		    System.arraycopy(additionalPath, 0, 
-		            newSearchPath, existingSearchPath.length,
-		            additionalPath.length);
-		    PropertyEditorManager.setEditorSearchPath(newSearchPath);
-                    PropertyEditorManager.registerEditor(String[].class, StringArrayEditor.class);
-		}
-	}
+    
+    static {
+        // Add Spring and ActiveMQ specific property editors
+        String[] additionalPath = new String[] {
+                "org.springframework.beans.propertyeditors",
+                "org.apache.activemq.util" };
+        synchronized (PropertyEditorManager.class) {
+            String[] existingSearchPath = PropertyEditorManager.getEditorSearchPath();
+            String[] newSearchPath = (String[]) Array.newInstance(String.class,
+                    existingSearchPath.length + additionalPath.length);
+            System.arraycopy(existingSearchPath, 0,
+                    newSearchPath, 0,
+                    existingSearchPath.length);
+            System.arraycopy(additionalPath, 0, 
+                    newSearchPath, existingSearchPath.length,
+                    additionalPath.length);
+            try {
+                PropertyEditorManager.setEditorSearchPath(newSearchPath);               

+                PropertyEditorManager.registerEditor(String[].class, StringArrayEditor.class);
+            } catch(java.security.AccessControlException ignore) {
+                // we might be in an applet...
+            }
+        }
+    }
     
     private IntrospectionSupport() {
     }



Mime
View raw message