mirror of
https://github.com/apache/activemq.git
synced 2025-02-16 23:16:52 +00:00
Fixes AMQ-3181
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1070876 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b643dc2c3
commit
65f2428342
@ -38,26 +38,30 @@ import org.apache.activemq.command.ActiveMQDestination;
|
||||
|
||||
|
||||
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() {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user