activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r764377 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
Date Mon, 13 Apr 2009 08:51:03 GMT
Author: dejanb
Date: Mon Apr 13 08:51:03 2009
New Revision: 764377

URL: http://svn.apache.org/viewvc?rev=764377&view=rev
Log:
additional fix for https://issues.apache.org/activemq/browse/AMQ-2086 - remove commons-lang
dependency

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=764377&r1=764376&r2=764377&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
Mon Apr 13 08:51:03 2009
@@ -18,6 +18,7 @@
 
 import java.beans.PropertyEditor;
 import java.beans.PropertyEditorManager;
+import java.lang.reflect.Array;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -34,17 +35,23 @@
 
 
 
+
 public final class IntrospectionSupport {
 	
 	static {
-		// find Spring and ActiveMQ specific property editors
-		 String[] searchPath = (String[])ArrayUtils.addAll(
-				 PropertyEditorManager.getEditorSearchPath(), 
-				 new String[] {
-					"org.springframework.beans.propertyeditors"
-				  , "org.apache.activemq.util"
-				 }
-			);
+		// Add Spring and ActiveMQ specific property editors
+		String[] additionalPath = new String[] {
+				"org.springframework.beans.propertyeditors",
+				"org.apache.activemq.util" };
+
+		String[] searchPath = (String[]) Array.newInstance(String.class,
+				PropertyEditorManager.getEditorSearchPath().length
+						+ additionalPath.length);
+		System.arraycopy(PropertyEditorManager.getEditorSearchPath(), 0,
+				searchPath, 0,
+				PropertyEditorManager.getEditorSearchPath().length);
+		System.arraycopy(additionalPath, 0, searchPath, PropertyEditorManager
+				.getEditorSearchPath().length, additionalPath.length);
 		PropertyEditorManager.setEditorSearchPath(searchPath);
 	}
     



Mime
View raw message