mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-21 15:02:17 +00:00
Added patched MapDB (v1.0.6), some changes in DataSerializerEx to prevent app crash
This commit is contained in:
parent
ad357c779e
commit
8a0e370936
@ -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'
|
||||
}
|
||||
|
Binary file not shown.
BIN
app/libs/org.mapdb.mapdb.main.jar
Normal file
BIN
app/libs/org.mapdb.mapdb.main.jar
Normal file
Binary file not shown.
@ -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<Data> implements Serializable {
|
||||
public class DataSerializerEx implements Serializer<Data>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1428836065493792295L;
|
||||
//TODO: test the performance impact
|
||||
@ -140,7 +139,8 @@ public class DataSerializerEx extends Serializer<Data> 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<Data> 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user