ER-071 Avoid using an object to access "static" fields or methods

Severity2
Enabledyes
Waivable
Rationale
Violation
![CDATA[private static int amountSum;
public void setAmount(final int newAmount) {
	logger.debug(new Integer(newAmount));
	amount = newAmount;
	this.amountSum += newAmount;
}]]
Fix
![CDATA[private static int amountSum;
public void setAmount(final int newAmount) {
	logger.debug(new Integer(newAmount));
	amount = newAmount;
	amountSum += newAmount;
}]]
Resources


Hammurapi 3 Copyright © 2004 Hammurapi Group. All Rights Reserved.