aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2013-06-03 10:51:47 -0400
committerAdam Domurad <[email protected]>2013-06-03 10:51:47 -0400
commit0fa3a1ac219c218d2c489b10c8ce70a108c50b10 (patch)
tree1a0f76ff7f7413e12328a2f6be1ab7df44bfe413 /netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java
parent58464afe42ef3f0558da034bece3a7800f9104ff (diff)
Add NativeLibraryStorageTEst
Diffstat (limited to 'netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java')
-rw-r--r--netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java b/netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java
index ef0bd82..7d9eb6e 100644
--- a/netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java
+++ b/netx/net/sourceforge/jnlp/cache/NativeLibraryStorage.java
@@ -76,6 +76,8 @@ public class NativeLibraryStorage {
return null;
}
+ public static final String[] NATIVE_LIBRARY_EXTENSIONS = { ".so", ".dylib", ".jnilib", ".framework", ".dll" };
+
/**
* Search for and enable any native code contained in a JAR by copying the
* native files into the filesystem. Called in the security context of the
@@ -89,8 +91,6 @@ public class NativeLibraryStorage {
if (localFile == null)
return;
- String[] librarySuffixes = { ".so", ".dylib", ".jnilib", ".framework", ".dll" };
-
try {
JarFile jarFile = new JarFile(localFile, false);
Enumeration<JarEntry> entries = jarFile.entries();
@@ -105,7 +105,7 @@ public class NativeLibraryStorage {
String name = new File(e.getName()).getName();
boolean isLibrary = false;
- for (String suffix : librarySuffixes) {
+ for (String suffix : NATIVE_LIBRARY_EXTENSIONS) {
if (name.endsWith(suffix)) {
isLibrary = true;
break;
@@ -132,7 +132,7 @@ public class NativeLibraryStorage {
}
}
- private void ensureNativeStoreDirectory() {
+ void ensureNativeStoreDirectory() {
if (jarEntryDirectory == null) {
jarEntryDirectory = createNativeStoreDirectory();
addSearchDirectory(jarEntryDirectory);