Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit ba1627a

Browse files
author
Libor Zoubek
committed
Bug 1171720 - AS7 upgrade fails if productType is missing
1 parent cb73790 commit ba1627a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,13 @@ protected String determineServerVersionFromHomeDir(File homeDir) {
766766
}
767767

768768
private boolean supportsPatching(JBossProductType productType, String version) {
769+
if (version == null || productType == null) {
770+
if (LOG.isDebugEnabled()) {
771+
LOG.debug("Defaulting to supportsPatching = false - One of the following is null (productType="
772+
+ productType + ", version=" + version + ")");
773+
}
774+
return false;
775+
}
769776
if (version.startsWith(productType.SHORT_NAME)) {
770777
//version of the resource is SHORT_NAME space VERSION
771778
version = version.substring(productType.SHORT_NAME.length() + 1);

0 commit comments

Comments
 (0)