diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt index cb3f727..f85eb11 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/DataSerializerEx.kt @@ -1,25 +1,17 @@ package io.github.chronosx88.influence.helpers import android.util.Log - import com.sleepycat.bind.EntryBinding import com.sleepycat.je.DatabaseEntry - +import io.netty.buffer.Unpooled import net.tomp2p.connection.SignatureFactory import net.tomp2p.storage.AlternativeCompositeByteBuf import net.tomp2p.storage.Data - -import java.io.ByteArrayInputStream -import java.io.ByteArrayOutputStream -import java.io.IOException -import java.io.OutputStream -import java.io.Serializable +import java.io.* import java.nio.ByteBuffer import java.security.InvalidKeyException import java.security.SignatureException -import io.netty.buffer.Unpooled - class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBinding, Serializable { private val LOG_TAG = "DataSerializerEx" diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/RoomHelper.java b/app/src/main/java/io/github/chronosx88/influence/helpers/RoomHelper.java index baeff7c..d17c7a7 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/RoomHelper.java +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/RoomHelper.java @@ -10,7 +10,7 @@ import io.github.chronosx88.influence.models.roomEntities.MessageEntity; @Database(entities = { MessageEntity.class, ChatEntity.class }, version = 2) -@TypeConverters({Converter.class}) +@TypeConverters({RoomTypeConverter.class}) public abstract class RoomHelper extends RoomDatabase { public abstract ChatDao chatDao(); public abstract MessageDao messageDao(); diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/Converter.java b/app/src/main/java/io/github/chronosx88/influence/helpers/RoomTypeConverter.java similarity index 94% rename from app/src/main/java/io/github/chronosx88/influence/helpers/Converter.java rename to app/src/main/java/io/github/chronosx88/influence/helpers/RoomTypeConverter.java index e14f50a..aa2dcdc 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/Converter.java +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/RoomTypeConverter.java @@ -8,7 +8,7 @@ import java.util.ArrayList; import androidx.room.TypeConverter; -public class Converter { +public class RoomTypeConverter { @TypeConverter public static ArrayList fromString(String value) { diff --git a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java index 4994606..58a89b7 100644 --- a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java +++ b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java @@ -6,7 +6,6 @@ import com.google.gson.Gson; import net.tomp2p.dht.PeerDHT; import net.tomp2p.peers.Number640; -import net.tomp2p.peers.PeerAddress; import net.tomp2p.storage.Data; import java.io.IOException; diff --git a/app/src/main/java/io/github/chronosx88/influence/models/BasicNetworkMessage.java b/app/src/main/java/io/github/chronosx88/influence/models/BasicNetworkMessage.java index df873a9..1bb934f 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/BasicNetworkMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/BasicNetworkMessage.java @@ -1,7 +1,5 @@ package io.github.chronosx88.influence.models; -import net.tomp2p.peers.PeerAddress; - import java.io.Serializable; /**