From b12fe7f98a9b523129c310d46698f430d17a8138 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 20 Sep 2011 04:58:01 +0200 Subject: Remove redundant: NativeLibrary.ensureNativeLibLoaded() --- src/java/com/jogamp/common/os/NativeLibrary.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/java/com/jogamp/common/os') diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java index f5c3264..beee639 100755 --- a/src/java/com/jogamp/common/os/NativeLibrary.java +++ b/src/java/com/jogamp/common/os/NativeLibrary.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. - * + * Copyright (c) 2011 JogAmp Community. All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -174,7 +175,7 @@ public class NativeLibrary implements DynamicLookupHelper { if (DEBUG) { System.err.println("Trying to load " + path); } - ensureNativeLibLoaded(); + NativeLibLoader.loadGlueGenRT(); long res; if(global) { res = dynLink.openLibraryGlobal(path, DEBUG); @@ -445,16 +446,4 @@ public class NativeLibrary implements DynamicLookupHelper { } return null; } - - private static volatile boolean loadedDynLinkNativeLib; - public static void ensureNativeLibLoaded() { - if (!loadedDynLinkNativeLib) { // volatile: ok - synchronized (NativeLibrary.class) { - if (!loadedDynLinkNativeLib) { - loadedDynLinkNativeLib = true; - NativeLibLoader.loadGlueGenRT(); - } - } - } - } } -- cgit v1.2.3