Make it final
This commit is contained in:
parent
5973ccd522
commit
957ff7d206
3 changed files with 7 additions and 7 deletions
|
@ -8,8 +8,8 @@ import java.security.Principal;
|
|||
* @version $Revision: 1 $
|
||||
*/
|
||||
public class KeycloakPrincipal implements Principal, Serializable {
|
||||
protected String name;
|
||||
protected String surrogate;
|
||||
protected final String name;
|
||||
protected final String surrogate;
|
||||
|
||||
public KeycloakPrincipal(String name, String surrogate) {
|
||||
this.name = name;
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Set;
|
|||
*/
|
||||
public class ProviderFactoryLoader<T extends Provider> implements Iterable<ProviderFactory<T>> {
|
||||
|
||||
private Map<String, ProviderFactory<T>> factories = new HashMap<String, ProviderFactory<T>>();
|
||||
private final Map<String, ProviderFactory<T>> factories = new HashMap<String, ProviderFactory<T>>();
|
||||
|
||||
private ProviderFactoryLoader(ServiceLoader<? extends ProviderFactory> serviceLoader) {
|
||||
for (ProviderFactory p : serviceLoader) {
|
||||
|
@ -59,9 +59,9 @@ public class ProviderFactoryLoader<T extends Provider> implements Iterable<Provi
|
|||
|
||||
private class LazyProviderFactory<T extends Provider> implements ProviderFactory<T> {
|
||||
|
||||
private volatile boolean initialized = false;
|
||||
private final ProviderFactory<T> factory;
|
||||
|
||||
private ProviderFactory<T> factory;
|
||||
private volatile boolean initialized = false;
|
||||
|
||||
private LazyProviderFactory(ProviderFactory<T> factory) {
|
||||
this.factory = factory;
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.ServiceLoader;
|
|||
*/
|
||||
public class ProviderLoader<T> implements Iterable<T> {
|
||||
|
||||
private ServiceLoader<T> serviceLoader;
|
||||
private final ServiceLoader<T> serviceLoader;
|
||||
|
||||
public static <T> Iterable<T> load(Class<T> service) {
|
||||
ServiceLoader<T> providers = ServiceLoader.load(service);
|
||||
|
@ -26,7 +26,7 @@ public class ProviderLoader<T> implements Iterable<T> {
|
|||
|
||||
private static class ProviderIterator<T> implements Iterator<T> {
|
||||
|
||||
private Iterator<T> itr;
|
||||
private final Iterator<T> itr;
|
||||
|
||||
private T next;
|
||||
|
||||
|
|
Loading…
Reference in a new issue