diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/UserBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/UserBean.java index 76548bda9b8a0a76668bf42f51996b310f1ecb08..304c1bfb1be4ae4f9b75483b856c92073435d161 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/UserBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/UserBean.java @@ -45,20 +45,21 @@ public final class UserBean implements Serializable { * This field contains the name of the user. */ private final String userName; - - private static final AtomicLong guestCounter = new AtomicLong(); + /** + * The counter to get a number for the current user and to differ the sessions in test purposes. + */ + private static final AtomicLong GUEST_COUNTER = new AtomicLong(); /** * Creates a new instance of this class. The user name is set to "Guest". */ public UserBean() { - this.userName = "Guest #" + UserBean.guestCounter.getAndIncrement(); + this.userName = "Guest #" + UserBean.GUEST_COUNTER.getAndIncrement(); } - @Override @PreDestroy - protected void finalize() { - UserBean.guestCounter.decrementAndGet(); + protected void destroy() { + UserBean.GUEST_COUNTER.decrementAndGet(); } /** diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java index 084a6a8468effc8363220188c90dcf95d98611ae..a696057eb99e9b680de2da29fd7c56f834acce63 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java @@ -447,7 +447,7 @@ public final class ACManager { ACManager.LOG.error("An error occured while updating the display.", ex); } catch (final InvocationTargetException ex) { ACManager.LOG.error("An error occured while updating the display.", ex); - } catch (final NullPointerException ex) { + } catch (final NullPointerException ex) { // NOPMD ACManager.LOG.error("An error occured while updating the display.", ex); } }