Package: libnative-platform-java / 0.14-5

libname.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: Library name is always stable under Debian GNU/Linux
 when shared object is installed into /usr/lib/jni/
 So remove Linux32Bit / Linux64Bit handling.
Author: Damien Raude-Morvan <drazzib@debian.org>
Last-Update: 2015-06-05
Forwarded: not-needed
--- a/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
+++ b/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
@@ -40,11 +40,7 @@ public abstract class Platform {
                         platform = new Window64Bit();
                     }
                 } else if (osName.contains("linux")) {
-                    if (arch.equals("amd64") || arch.equals("x86_64")) {
-                        platform = new Linux64Bit();
-                    } else if (arch.equals("i386") || arch.equals("x86")) {
-                        platform = new Linux32Bit();
-                    }
+                    platform = new Linux();
                 } else if (osName.contains("os x") || osName.contains("darwin")) {
                     if (arch.equals("i386")) {
                         platform = new MacOs32Bit();
@@ -240,7 +236,7 @@ public abstract class Platform {
         }
     }
 
-    private abstract static class Linux extends Unix {
+    private static class Linux extends Unix {
         @Override
         public <T extends NativeIntegration> T get(Class<T> type, NativeLibraryLoader nativeLibraryLoader) {
             return super.get(type, nativeLibraryLoader);
@@ -255,6 +251,11 @@ public abstract class Platform {
         public boolean isLinux() {
             return true;
         }
+
+        @Override
+        public String getId() {
+            return "linux";
+        }
     }
 
     private static class Linux32Bit extends Linux {