Polish some Map operations

Closes gh-15153
pull/15144/merge
dreis2211 6 years ago committed by Stephane Nicoll
parent ab6ab0d533
commit 3b4b0641d9

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -84,12 +84,7 @@ class TokenValidator {
} }
private boolean hasValidKeyId(String tokenKey) { private boolean hasValidKeyId(String tokenKey) {
for (String candidate : this.tokenKeys.keySet()) { return this.tokenKeys.containsKey(tokenKey);
if (tokenKey.equals(candidate)) {
return true;
}
}
return false;
} }
private boolean hasValidSignature(Token token, String key) { private boolean hasValidSignature(Token token, String key) {

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -43,8 +43,8 @@ public final class AutoConfigurationImportedCondition
ConditionEvaluationReport report = ConditionEvaluationReport ConditionEvaluationReport report = ConditionEvaluationReport
.get((ConfigurableListableBeanFactory) context .get((ConfigurableListableBeanFactory) context
.getAutowireCapableBeanFactory()); .getAutowireCapableBeanFactory());
return report.getConditionAndOutcomesBySource().keySet() return report.getConditionAndOutcomesBySource()
.contains(this.autoConfigurationClass.getName()); .containsKey(this.autoConfigurationClass.getName());
} }
/** /**

Loading…
Cancel
Save