From 9da5bc1fe999caa924bd8dceafeff93ddf9d16a0 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Fri, 23 Sep 2011 13:17:36 +0200
Subject: TempJarCache/JNILibLoaderBase: Validate the to be loader JarFile's
 Certificates if caller has any. Add Convenient
 JNILibLoaderBase.addNativeJarLibs(..) method.

---
 src/java/com/jogamp/common/os/Platform.java | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

(limited to 'src/java/com/jogamp/common/os')

diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 3627513..38635e1 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -285,22 +285,19 @@ public class Platform {
             public Object run() {
                 if(TempJarCache.initSingleton()) {
                   try {
-                    URL jarUrlRoot = JarUtil.getJarURLDirname(
+                    final URL jarUrlRoot = JarUtil.getJarURLDirname(
                                         JarUtil.getJarURL(Platform.class.getName(), cl) );
-                    System.err.println("gluegen-rt: url-root "+jarUrlRoot);
-                    URL nativeJarURL = JarUtil.getJarURL(jarUrlRoot, nativeJarName);
-                    System.err.println("gluegen-rt: nativeJarURL "+nativeJarURL);
-                    JarFile nativeJar = JarUtil.getJarFile(nativeJarURL, cl);
-                    System.err.println("gluegen-rt: nativeJar "+nativeJar.getName());
-                        TempJarCache.bootstrapNativeLib(libBaseName, nativeJar);
-                      } catch (IOException ioe) {
-                        ioe.printStackTrace();
-                      }
-                    }
-                    DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false);
-                    return null;
+                    final URL nativeJarURL = JarUtil.getJarURL(jarUrlRoot, nativeJarName);
+                    final JarFile nativeJar = JarUtil.getJarFile(nativeJarURL, cl);
+                    TempJarCache.bootstrapNativeLib(Platform.class, libBaseName, nativeJar);
+                  } catch (IOException ioe) {
+                    ioe.printStackTrace();
                   }
-            });
+                }
+                DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false);
+                return null;
+            }
+        });
     }
     
     /**
-- 
cgit v1.2.3