geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1344075 - /geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
Date Wed, 30 May 2012 01:54:01 GMT
Author: gawor
Date: Wed May 30 01:54:00 2012
New Revision: 1344075

URL: http://svn.apache.org/viewvc?rev=1344075&view=rev
Log:
GERONIMO-6199: Some Java vendor have less than six characters

Modified:
    geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java?rev=1344075&r1=1344074&r2=1344075&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
Wed May 30 01:54:00 2012
@@ -44,10 +44,10 @@ public class JvmVendor {
 
     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)



Mime
View raw message