Migliorato il save e restore counter in modo da funzionare anche se ci sono bug o crash
This commit is contained in:
@@ -16,7 +16,7 @@ public class IdCounter {
|
||||
|
||||
public static void save_counter() throws FileNotFoundException,IOException,ClassNotFoundException{
|
||||
File f_data = new File("id_counter");
|
||||
Integer data = Integer.valueOf(Global.get_next_id() - 1);
|
||||
Integer data = Integer.valueOf(Global.getGeneral_counter());
|
||||
ObjectOutputStream writer = new ObjectOutputStream(new FileOutputStream(f_data));
|
||||
writer.writeObject(data);
|
||||
writer.close();
|
||||
|
||||
Reference in New Issue
Block a user