Replace tabs with spaces
This commit is contained in:
@@ -53,18 +53,18 @@ public class Native {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void load(String group, String name) {
|
public static void load(String group, String name) {
|
||||||
load(group, name, name);
|
load(group, name, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void load(String group, String name, String file) {
|
public static void load(String group, String name, String file) {
|
||||||
init(null);
|
init(null);
|
||||||
try {
|
try {
|
||||||
loader.load(group, name, Platform.current().getLibraryName(file));
|
loader.load(group, name, Platform.current().getLibraryName(file));
|
||||||
} catch (NativeException e) {
|
} catch (NativeException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
throw new NativeException("Failed to load native library.");
|
throw new NativeException("Failed to load native library.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
package com.github.boukefalos.jlibloader;
|
package com.github.boukefalos.jlibloader;
|
||||||
|
|
||||||
public class NativeException extends RuntimeException {
|
public class NativeException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public NativeException(String message, Throwable throwable) {
|
public NativeException(String message, Throwable throwable) {
|
||||||
super(message, throwable);
|
super(message, throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ package com.github.boukefalos.jlibloader;
|
|||||||
* Thrown when a given integration is not available for the current machine.
|
* Thrown when a given integration is not available for the current machine.
|
||||||
*/
|
*/
|
||||||
public class NativeLibraryUnavailableException extends NativeException {
|
public class NativeLibraryUnavailableException extends NativeException {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public NativeLibraryUnavailableException(String message) {
|
public NativeLibraryUnavailableException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.github.boukefalos.jlibloader.internal;
|
package com.github.boukefalos.jlibloader.internal;
|
||||||
|
|
||||||
public class LibraryDef {
|
public class LibraryDef {
|
||||||
final String group;
|
final String group;
|
||||||
final String name;
|
final String name;
|
||||||
final String file;
|
final String file;
|
||||||
final String platform;
|
final String platform;
|
||||||
|
|
||||||
public LibraryDef(String group, String name, String file, String platform) {
|
public LibraryDef(String group, String name, String file, String platform) {
|
||||||
this.group = group;
|
this.group = group;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
@@ -30,7 +30,7 @@ public class LibraryDef {
|
|||||||
return name.hashCode() ^ platform.hashCode();
|
return name.hashCode() ^ platform.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGroupPath() {
|
public String getGroupPath() {
|
||||||
return group.replace(".", "/");
|
return group.replace(".", "/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class NativeLibraryLoader {
|
|||||||
} catch (NativeException e) {
|
} catch (NativeException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
throw new NativeException(String.format("Failed to load native library '%s' for %s.", libraryFileName, platform), t);
|
throw new NativeException(String.format("Failed to load native library '%s' for %s.", libraryFileName, platform), t);
|
||||||
}
|
}
|
||||||
loaded.add(libraryFileName);
|
loaded.add(libraryFileName);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public abstract class Platform {
|
|||||||
private static abstract class OsX extends Posix {
|
private static abstract class OsX extends Posix {
|
||||||
@Override
|
@Override
|
||||||
public String getLibraryName(String name) {
|
public String getLibraryName(String name) {
|
||||||
return String.format("lib%s.dylib", name);
|
return String.format("lib%s.dylib", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user