mirror of https://github.com/apache/activemq.git
resolve https://issues.apache.org/activemq/browse/AMQ-2350 - amq may not have exclusive access to the propertyEditorManager
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@801989 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a6279e170
commit
6b283abdd0
|
@ -42,16 +42,18 @@ public final class IntrospectionSupport {
|
|||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
private IntrospectionSupport() {
|
||||
|
|
Loading…
Reference in New Issue