Simplify AccountState put method
Actuall the condition works ok as 'p' is never null when the 'value' is not null. Still the removed part is not necessary and could lead to a NullPointerException if properties(boolean allocate) method changes. FindBugs complains about it too. Change-Id: Ia776d31ba9b3df4709aa7e87bde90602d7d61225 Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
This commit is contained in:
@@ -150,7 +150,7 @@ public class AccountState {
|
||||
*/
|
||||
public <T> void put(PropertyKey<T> key, @Nullable T value) {
|
||||
Cache<PropertyKey<Object>, Object> p = properties(value != null);
|
||||
if (p != null || value != null) {
|
||||
if (p != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
PropertyKey<Object> k = (PropertyKey<Object>) key;
|
||||
if (value != null) {
|
||||
|
||||
Reference in New Issue
Block a user