GERONIMO-6199: Some Java vendor have less than six characters
git-svn-id: https://svn.apache.org/repos/asf/geronimo/server/trunk@1344072 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java b/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
index c5336eb..b3c939f 100644
--- a/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
+++ b/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
@@ -44,10 +44,10 @@
static {
String fullVendorName = getFullName();
- boolean bApache = fullVendorName.substring(0, 6).equalsIgnoreCase("Apache"); // aka. Apache Harmony
- boolean bIBM = fullVendorName.substring(0, 3).equalsIgnoreCase("IBM"); // aka. IBM, but not IBM Hybrid
- boolean bSun = !bIBM && !bApache; // default all others to Sun
- boolean bHP = fullVendorName.substring(0, 6).equalsIgnoreCase("Hewlet"); // aka. Hewlett-Packard Company
+ boolean bApache = fullVendorName.regionMatches(true, 0, "Apache", 0, 6); // aka. Apache Harmony
+ boolean bIBM = fullVendorName.regionMatches(true, 0, "IBM", 0, 3); // aka. IBM, but not IBM Hybrid
+ boolean bSun = !bIBM && !bApache; // default all others to Sun
+ boolean bHP = fullVendorName.regionMatches(true, 0, "Hewlett", 0, 7); // aka. Hewlett-Packard Company
boolean bIBMHybrid = false;
// Special code for IBM Hybrid SDK (Sun JVM with IBM extensions on Solaris and HP-UX)