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:
Eryk Szymanski
2016-07-22 14:08:13 +02:00
parent 2a15535d76
commit 972f822ac3

View File

@@ -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) {