diff --git a/pom.xml b/pom.xml index e30528a..fb0b3aa 100755 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ src/main/resources + org/xerial/snappy/*.bytecode org/xerial/snappy/native/** diff --git a/src/main/java/org/xerial/snappy/SnappyLoader.java b/src/main/java/org/xerial/snappy/SnappyLoader.java index b5ee247..83b37d4 100755 --- a/src/main/java/org/xerial/snappy/SnappyLoader.java +++ b/src/main/java/org/xerial/snappy/SnappyLoader.java @@ -95,7 +95,8 @@ public class SnappyLoader private static byte[] getByteCode(String resourcePath) throws IOException { InputStream in = SnappyLoader.class.getResourceAsStream(resourcePath); - assert (in != null); + if (in == null) + throw new IOException(resourcePath + " is not found"); byte[] buf = new byte[1024]; ByteArrayOutputStream byteCodeBuf = new ByteArrayOutputStream(); for (int readLength; (readLength = in.read(buf)) != -1;) { diff --git a/src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode b/src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode new file mode 100755 index 0000000..a66950e Binary files /dev/null and b/src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode differ diff --git a/src/main/resources/org/xerial/snappy/native/Windows/amd64/snappyjava.dll b/src/main/resources/org/xerial/snappy/native/Windows/amd64/snappyjava.dll index e846fc9..9d834a6 100755 Binary files a/src/main/resources/org/xerial/snappy/native/Windows/amd64/snappyjava.dll and b/src/main/resources/org/xerial/snappy/native/Windows/amd64/snappyjava.dll differ