Browse Source

Make User abstract and remove useless Serializable implementation

Yohan Simard 7 months ago
parent
commit
a49432a668

+ 2
- 1
client/src/main/java/fr/insa/clavardator/client/db/DatabaseController.java View File

@@ -1,6 +1,7 @@
1 1
 package fr.insa.clavardator.client.db;
2 2
 
3 3
 import fr.insa.clavardator.client.users.CurrentUser;
4
+import fr.insa.clavardator.client.users.PeerUser;
4 5
 import fr.insa.clavardator.lib.message.FileMessage;
5 6
 import fr.insa.clavardator.lib.message.Message;
6 7
 import fr.insa.clavardator.lib.users.User;
@@ -203,7 +204,7 @@ public class DatabaseController {
203 204
 			while (res.next()) {
204 205
 				String id = res.getString("id");
205 206
 				String username = res.getString("username");
206
-				userList.add(new User(id, username));
207
+				userList.add(new PeerUser(id, username));
207 208
 			}
208 209
 			Log.v(getClass().getSimpleName(), userList.size() + " users fetched");
209 210
 

+ 1
- 2
lib/src/main/java/fr/insa/clavardator/lib/users/User.java View File

@@ -2,9 +2,8 @@ package fr.insa.clavardator.lib.users;
2 2
 
3 3
 import java.beans.PropertyChangeListener;
4 4
 import java.beans.PropertyChangeSupport;
5
-import java.io.Serializable;
6 5
 
7
-public class User implements Serializable {
6
+public abstract class User {
8 7
 	// Make this class observable
9 8
 	private final transient PropertyChangeSupport pcs = new PropertyChangeSupport(this);
10 9
 	private String username;

Loading…
Cancel
Save