felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1441169 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: BundleImpl.java util/manifestparser/R4LibraryClause.java
Date Thu, 31 Jan 2013 20:05:02 GMT
Author: rickhall
Date: Thu Jan 31 20:05:01 2013
New Revision: 1441169

URL: http://svn.apache.org/viewvc?rev=1441169&view=rev
Log:
Apply patch (FELIX-3844) to add some more Windows OS aliases.

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java?rev=1441169&r1=1441168&r2=1441169&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java Thu Jan
31 20:05:01 2013
@@ -1014,6 +1014,7 @@ class BundleImpl implements Bundle, Bund
         // Uninstall the bundle.
         getFramework().uninstallBundle(this);
     }
+
     private static final SecurityManagerEx m_smEx = new SecurityManagerEx();
     private static final ClassLoader m_classloader = Felix.class.getClassLoader();
 

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java?rev=1441169&r1=1441168&r2=1441169&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
Thu Jan 31 20:05:01 2013
@@ -134,17 +134,7 @@ public class R4LibraryClause
 
     private boolean checkOSNames(String currentOSName, String[] osnames)
     {
-        boolean win32 = currentOSName.startsWith("win") &&
-            (currentOSName.equals("windows95")
-            || currentOSName.equals("windows98")
-            || currentOSName.equals("windowsnt")
-            || currentOSName.equals("windows2000")
-            || currentOSName.equals("windows2003")
-            || currentOSName.equals("windows2008")
-            || currentOSName.equals("windowsxp")
-            || currentOSName.equals("windowsce")
-            || currentOSName.equals("windowsvista")
-            || currentOSName.equals("windows7"));
+        boolean win32 = currentOSName.startsWith("win") && !currentOSName.equals("windowsce");
 
         for (int i = 0; (osnames != null) && (i < osnames.length); i++)
         {
@@ -381,7 +371,11 @@ public class R4LibraryClause
             }
             else if (value.indexOf("2008") >= 0)
             {
-                os = "windows2008";
+                os = "windowsserver2008";
+            }
+            else if (value.indexOf("2012") >= 0)
+            {
+                os = "windowsserver2012";
             }
             else if (value.indexOf("xp") >= 0)
             {
@@ -395,11 +389,18 @@ public class R4LibraryClause
             {
                 os = "windowsvista";
             }
-            // will need better test here if any future Windows version has a 7 in it!
-            else if (value.indexOf("7") >= 0)
+            else if ((value.indexOf(" 7") >= 0) || value.equals("win7"))
             {
                 os = "windows7";
             }
+            else if ((value.indexOf(" 8") >= 0) || value.equals("win8"))
+            {
+                os = "windows8";
+            }
+            else if ((value.indexOf(" 9") >= 0) || value.equals("win9"))
+            {
+                os = "windows9";
+            }
             return os;
         }
         else if (value.startsWith("linux"))
@@ -465,7 +466,7 @@ public class R4LibraryClause
     {
         value = value.toLowerCase();
 
-        if (value.startsWith("x86-64") || value.startsWith("amd64") || 
+        if (value.startsWith("x86-64") || value.startsWith("amd64") ||
             value.startsWith("em64") || value.startsWith("x86_64"))
         {
             return "x86-64";



Mime
View raw message