Author: walkerr
Date: Thu Jan 7 14:20:04 2010
New Revision: 896891
URL: http://svn.apache.org/viewvc?rev=896891&view=rev
Log:
[FELIX-1969] include Windows 7 and 2003 in OS name handling
Modified:
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/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=896891&r1=896890&r2=896891&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 7 14:20:04 2010
@@ -136,12 +136,14 @@
{
boolean win32 = currentOSName.startsWith("win") &&
(currentOSName.equals("windows95") ||
- currentOSName.equals("windows98") ||
- currentOSName.equals("windowsnt") ||
- currentOSName.equals("windows2000") ||
- currentOSName.equals("windowsxp") ||
- currentOSName.equals("windowsce") ||
- currentOSName.equals("windowsvista"));
+ currentOSName.equals("windows98") ||
+ currentOSName.equals("windowsnt") ||
+ currentOSName.equals("windows2000") ||
+ currentOSName.equals("windows2003") ||
+ currentOSName.equals("windowsxp") ||
+ currentOSName.equals("windowsce") ||
+ currentOSName.equals("windowsvista") ||
+ currentOSName.equals("windows7"));
for (int i = 0; (osnames != null) && (i < osnames.length); i++)
{
@@ -372,6 +374,10 @@
{
os = "windows2000";
}
+ else if (value.indexOf("2003") >= 0)
+ {
+ os = "windows2003";
+ }
else if (value.indexOf("xp") >= 0)
{
os = "windowsxp";
@@ -384,6 +390,11 @@
{
os = "windowsvista";
}
+ // will need better test here if any future Windows version has a
7 in it!
+ else if (value.indexOf("7") >= 0)
+ {
+ os = "windows7";
+ }
return os;
}
else if (value.startsWith("linux"))