mirror of https://github.com/apache/activemq.git
remove npe when no jars on classpath, in ide
This commit is contained in:
parent
838bbebeeb
commit
57fc29b6ce
|
@ -43,6 +43,7 @@ public final class ActiveMQConnectionMetaData implements ConnectionMetaData {
|
|||
Package p = Package.getPackage("org.apache.activemq");
|
||||
if (p != null) {
|
||||
version = p.getImplementationVersion();
|
||||
if (version != null) {
|
||||
Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+).*");
|
||||
Matcher m = pattern.matcher(version);
|
||||
if (m.matches()) {
|
||||
|
@ -50,6 +51,7 @@ public final class ActiveMQConnectionMetaData implements ConnectionMetaData {
|
|||
minor = Integer.parseInt(m.group(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
PROVIDER_VERSION = version;
|
||||
|
|
Loading…
Reference in New Issue