Skip to content
Snippets Groups Projects
Commit 9453b869 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Some minor modifications for PMD.

parent a33008d0
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
/**
......
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment