diff --git a/app/build.gradle b/app/build.gradle index 4b1669c..2f6ffc5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,6 +42,7 @@ dependencies { annotationProcessor "androidx.room:room-compiler:2.1.0-alpha04" implementation('net.tomp2p:tomp2p-all:5.0-Beta8') { exclude group: 'net.tomp2p', module: 'tomp2p-storage' + exclude group: 'org.mapdb', module: 'mapdb' } implementation 'org.slf4j:slf4j-log4j12:1.7.26' implementation group: 'com.h2database', name: 'h2-mvstore', version: '1.4.197' @@ -50,5 +51,5 @@ dependencies { implementation 'com.google.code.gson:gson:2.8.5' implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '3.1.0.RELEASE' implementation 'de.hdodenhof:circleimageview:3.0.0' - implementation 'org.mapdb:mapdb:2.0-beta13' + implementation group: 'org.objenesis', name: 'objenesis', version: '2.6' } diff --git a/app/libs/jboss-serialization.jar b/app/libs/jboss-serialization.jar deleted file mode 100644 index c15c60d..0000000 Binary files a/app/libs/jboss-serialization.jar and /dev/null differ diff --git a/app/libs/org.mapdb.mapdb.main.jar b/app/libs/org.mapdb.mapdb.main.jar new file mode 100644 index 0000000..2391adb Binary files /dev/null and b/app/libs/org.mapdb.mapdb.main.jar differ diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.java b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.java index cebe499..f526bf2 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.java +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.java @@ -7,7 +7,6 @@ import net.tomp2p.peers.Number160; import net.tomp2p.storage.AlternativeCompositeByteBuf; import net.tomp2p.storage.Data; -import org.mapdb.DataIO; import org.mapdb.Serializer; import java.io.DataInput; @@ -27,7 +26,7 @@ import java.security.SignatureException; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -public class DataSerializerEx extends Serializer implements Serializable { +public class DataSerializerEx implements Serializer, Serializable { private static final long serialVersionUID = 1428836065493792295L; //TODO: test the performance impact @@ -140,7 +139,8 @@ public class DataSerializerEx extends Serializer implements Serializable { } else if(header == 0) { return deserializeMapDB(in); } else { - throw new IOException("unexpected header: " + header); + //throw new IOException("unexpected header: " + header); + return null; } } @@ -164,8 +164,6 @@ public class DataSerializerEx extends Serializer implements Serializable { //throw new IOException("signature could not be read"); Log.e("DataSerializerEx", "# Signature could not be read!"); } - DataIO.DataInputByteArray di = (DataIO.DataInputByteArray) in; - di.setPos(di.internalByteArray().length); return data; } diff --git a/gradlew b/gradlew old mode 100644 new mode 100755