Minimize MapSession's use of Secure Random

Previously when creating a MapSession from an existing session required
that UUID.randomUUID() be invoked. This could slow down the system
since it requires entropy.

MapSession now has a constructor that accepts the id which prevents
Secure random from being used when the session is already known.

Fixes gh-271
This commit is contained in:
Rob Winch
2015-08-19 11:38:17 -05:00
parent 6414d0ddb8
commit 5fd2c71559
3 changed files with 16 additions and 5 deletions

View File

@@ -34,7 +34,7 @@ public class MapSessionTests {
@Test(expected = IllegalArgumentException.class)
public void constructorNullSession() {
new MapSession(null);
new MapSession((ExpiringSession) null);
}
/**