additional fix for https://issues.apache.org/activemq/browse/AMQ-2086 - remove commons-lang dependency

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@764377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-04-13 08:51:03 +00:00
parent d185430ffe
commit 8f80e34292
1 changed files with 15 additions and 8 deletions

View File

@ -18,6 +18,7 @@ package org.apache.activemq.util;
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 @@ import org.apache.commons.lang.ArrayUtils;
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);
}