]> gerrit.simantics Code Review - simantics/platform.git/commit
Fixed org.simantics.lz4 to use bundle data area when running in OSGi 49/1149/3
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 27 Oct 2017 13:06:18 +0000 (16:06 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 27 Oct 2017 13:10:15 +0000 (16:10 +0300)
commitec2c82bad3ddb65bf45cb1e35da996620f5a7304
tree565658f3514ebeeff1ac402b046acee401cd7409
parent44984b07d8a3827c0feee4ef3bc9e953e7b4607c
Fixed org.simantics.lz4 to use bundle data area when running in OSGi

Previously org.simantics.lz4 would always extract the native LZ4 dynamic
library to java.io.tmpdir which is plain stupid. Now when running in
OSGi environment, we simply extract the file once to the data area and
reuse it from there.

Further development could even use the MD5 sum of the lz4 DLL to extract
every version of the DLL only once to java.io.tmpdir but I'm saving this
for later.

refs #7578

Change-Id: I50566999749b20cca6d56ab52e59101ec3a7b6f6
bundles/org.simantics.lz4/META-INF/MANIFEST.MF
bundles/org.simantics.lz4/src/net/jpountz/lz4/LZ4Factory.java
bundles/org.simantics.lz4/src/net/jpountz/util/ChecksumUtil.java [new file with mode: 0644]
bundles/org.simantics.lz4/src/net/jpountz/util/Native.java
bundles/org.simantics.lz4/src/net/jpountz/util/NativeParameters.java [new file with mode: 0644]
bundles/org.simantics.lz4/src/net/jpountz/xxhash/XXHashFactory.java
bundles/org.simantics.lz4/src/org/simantics/lz4/bundle/Activator.java