Added null parent destination check for cell permissions, Deprecated checkForReservedNames, Fixed characters not in odb showing up in characters datatable, Removed updating of highestid in datatables until persistence is fixed in odb's

This commit is contained in:
Waverunner
2014-10-22 13:17:56 -04:00
parent ba70448f80
commit db02c81261
4 changed files with 20 additions and 7 deletions
+5 -4
View File
@@ -838,22 +838,23 @@ public class ObjectService implements INetworkDispatch {
// stack overflow when using recursion
long newId = 0;
try {
//try {
synchronized(objectMutex) {
newId = highestId.get();
newId = highestId.incrementAndGet();
ObjectDatabase objectIdODB = core.getObjectIdODB();
while (objectList.containsKey(newId) || objectIdODB.contains(newId)) {
newId = highestId.incrementAndGet();
}
//System.out.println("Got an objid.");
}
final String sql = "UPDATE highestid SET id=? WHERE id=(SELECT MAX(id) FROM highestid)";
/*final String sql = "UPDATE highestid SET id=? WHERE id=(SELECT MAX(id) FROM highestid)";
final PreparedStatement ps2 = databaseConnection.preparedStatement(sql);
ps2.setLong(1, newId);
ps2.executeUpdate();
ps2.close();
} catch (SQLException e) {
e.printStackTrace();
}
}*/
return newId;
}