Fix new Sonar smells
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2019 the original author or authors.
|
||||
* Copyright 2015-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ import com.esotericsoftware.kryo.Registration;
|
||||
*/
|
||||
public abstract class AbstractKryoRegistrar implements KryoRegistrar {
|
||||
|
||||
protected static final Kryo kryo = new Kryo(); // NOSONAR TODO uppercase in 5.2
|
||||
protected static final Kryo KRYO = new Kryo();
|
||||
|
||||
protected final Log log = LogFactory.getLog(getClass()); // NOSONAR property is final
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class KryoClassListRegistrar extends AbstractKryoRegistrar {
|
||||
if (!CollectionUtils.isEmpty(this.registeredClasses)) {
|
||||
for (int i = 0; i < this.registeredClasses.size(); i++) {
|
||||
registrations.add(new Registration(this.registeredClasses.get(i),
|
||||
kryo.getSerializer(this.registeredClasses.get(i)), i + this.initialValue));
|
||||
KRYO.getSerializer(this.registeredClasses.get(i)), i + this.initialValue));
|
||||
}
|
||||
}
|
||||
return registrations;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2019 the original author or authors.
|
||||
* Copyright 2015-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ public class KryoClassMapRegistrar extends AbstractKryoRegistrar {
|
||||
if (!CollectionUtils.isEmpty(this.registeredClasses)) {
|
||||
for (Map.Entry<Integer, Class<?>> entry : this.registeredClasses.entrySet()) {
|
||||
registrations.add(
|
||||
new Registration(entry.getValue(), kryo.getSerializer(entry.getValue()), entry.getKey()));
|
||||
new Registration(entry.getValue(), KRYO.getSerializer(entry.getValue()), entry.getKey()));
|
||||
}
|
||||
}
|
||||
return registrations;
|
||||
|
||||
Reference in New Issue
Block a user