felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r813853 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
Date Fri, 11 Sep 2009 14:28:13 GMT
Author: rickhall
Date: Fri Sep 11 14:28:12 2009
New Revision: 813853

URL: http://svn.apache.org/viewvc?rev=813853&view=rev
Log:
We need to check to see if we have additional native library
extensions before accessing them. (FELIX-1580)

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

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java?rev=813853&r1=813852&r2=813853&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
Fri Sep 11 14:28:12 2009
@@ -109,10 +109,15 @@
                 return true;
             }
 
-            int idx = libname.lastIndexOf(".");
-            libname = (idx < 0)
-                ? libname + "." + exts[extIdx++]
-                : libname.substring(0, idx) + "." + exts[extIdx++];
+            // If we have other native library extensions to try, then
+            // calculate the new native library name.
+            if (extIdx < exts.length)
+            {
+                int idx = libname.lastIndexOf(".");
+                libname = (idx < 0)
+                    ? libname + "." + exts[extIdx++]
+                    : libname.substring(0, idx) + "." + exts[extIdx++];
+            }
         }
         while ((exts != null) && (extIdx < exts.length));
 



Mime
View raw message