This commit is contained in:
Phillip Webb
2024-01-22 11:57:37 -08:00
parent 72f8bb8d13
commit 088b313ae5
2 changed files with 5 additions and 7 deletions

View File

@@ -68,7 +68,6 @@ class ReactiveSessionsEndpointTests {
assertThat(result.get(0).getLastAccessedTime()).isEqualTo(session.getLastAccessedTime());
assertThat(result.get(0).getMaxInactiveInterval()).isEqualTo(session.getMaxInactiveInterval().getSeconds());
assertThat(result.get(0).isExpired()).isEqualTo(session.isExpired());
}).expectComplete().verify(Duration.ofSeconds(1));
then(this.indexedSessionRepository).should().findByPrincipalName("user");
}

View File

@@ -307,13 +307,12 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
private void checkEnabledValueMatchesExisting(ItemMetadata existing, boolean enabledByDefault, String sourceType) {
boolean existingDefaultValue = (boolean) existing.getDefaultValue();
if (enabledByDefault == existingDefaultValue) {
return;
if (enabledByDefault != existingDefaultValue) {
throw new IllegalStateException(
"Existing property '%s' from type %s has a conflicting value. Existing value: %b, new value from type %s: %b"
.formatted(existing.getName(), existing.getSourceType(), existingDefaultValue, sourceType,
enabledByDefault));
}
throw new IllegalStateException(
"Existing property '%s' from type %s has a conflicting value. Existing value: %b, new value from type %s: %b"
.formatted(existing.getName(), existing.getSourceType(), existingDefaultValue, sourceType,
enabledByDefault));
}
private boolean hasMainReadOperation(TypeElement element) {