From 4dd6eca5650d15ee04b52ea3e1a9e6e170567bb6 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Wed, 20 Mar 2019 14:55:35 +0400 Subject: [PATCH] Fixed build error in Entities (id wasn't @NonNull) --- .../chronosx88/influence/models/roomEntities/ChatEntity.java | 3 ++- .../influence/models/roomEntities/MessageEntity.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java index f55a1a0..79861f1 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java @@ -1,12 +1,13 @@ package io.github.chronosx88.influence.models.roomEntities; +import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity(tableName = "chats") public class ChatEntity { - @PrimaryKey String id; + @NonNull @PrimaryKey String id; @ColumnInfo String name; @ColumnInfo String keyPairID; diff --git a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java index eed5e44..a9fd45d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/MessageEntity.java @@ -7,7 +7,7 @@ import androidx.room.PrimaryKey; @Entity(tableName = "messages") public class MessageEntity { - @PrimaryKey String id; + @NonNull @PrimaryKey String id; @ColumnInfo String chatID; @ColumnInfo String sender; @ColumnInfo String text;