diff --git a/settings.gradle b/settings.gradle index ba295ee37ff..cf24142b94e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,8 +10,8 @@ include "spring-aop" include "spring-aspects" include "spring-beans" include "spring-context" -include "spring-context-support" include "spring-context-indexer" +include "spring-context-support" include "spring-core" include "kotlin-coroutines" project(':kotlin-coroutines').projectDir = file('spring-core/kotlin-coroutines') @@ -26,8 +26,8 @@ include "spring-oxm" include "spring-test" include "spring-tx" include "spring-web" -include "spring-webmvc" include "spring-webflux" +include "spring-webmvc" include "spring-websocket" include "framework-bom" include "integration-tests" diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java index 3177c4b20ed..4a6f52400e8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java +++ b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2021 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. @@ -41,10 +41,10 @@ public class TypeMismatchException extends PropertyAccessException { private String propertyName; @Nullable - private transient Object value; + private final transient Object value; @Nullable - private Class requiredType; + private final Class requiredType; /** diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java index 5439bfa5588..cf41fed3b29 100644 --- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java +++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 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. @@ -179,7 +179,7 @@ public class SpringValidatorAdapter implements SmartValidator, javax.validation. } } else { - // got no BindingResult - can only do standard rejectValue call + // Got no BindingResult - can only do standard rejectValue call // with automatic extraction of the current field value errors.rejectValue(field, errorCode, errorArgs, violation.getMessage()); } @@ -386,7 +386,7 @@ public class SpringValidatorAdapter implements SmartValidator, javax.validation. return (type != null ? this.targetValidator.unwrap(type) : (T) this.targetValidator); } catch (ValidationException ex) { - // ignore if just being asked for plain Validator + // Ignore if just being asked for plain JSR-303 Validator if (javax.validation.Validator.class == type) { return (T) this.targetValidator; } diff --git a/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java b/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java index 6bc70e12e0e..9e253c843b7 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2021 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. @@ -40,7 +40,7 @@ public class EnableLoadTimeWeavingTests { @Test public void control() { GenericXmlApplicationContext ctx = - new GenericXmlApplicationContext(getClass(), "EnableLoadTimeWeavingTests-context.xml"); + new GenericXmlApplicationContext(getClass(), "EnableLoadTimeWeavingTests-context.xml"); ctx.getBean("loadTimeWeaver", LoadTimeWeaver.class); } @@ -73,9 +73,11 @@ public class EnableLoadTimeWeavingTests { verify(loadTimeWeaver).addTransformer(isA(ClassFileTransformer.class)); } + @Configuration @EnableLoadTimeWeaving(aspectjWeaving=AspectJWeaving.DISABLED) static class EnableLTWConfig_withAjWeavingDisabled implements LoadTimeWeavingConfigurer { + @Override public LoadTimeWeaver getLoadTimeWeaver() { return mock(LoadTimeWeaver.class); @@ -85,6 +87,7 @@ public class EnableLoadTimeWeavingTests { @Configuration @EnableLoadTimeWeaving(aspectjWeaving=AspectJWeaving.AUTODETECT) static class EnableLTWConfig_withAjWeavingAutodetect implements LoadTimeWeavingConfigurer { + @Override public LoadTimeWeaver getLoadTimeWeaver() { return mock(LoadTimeWeaver.class); @@ -94,9 +97,11 @@ public class EnableLoadTimeWeavingTests { @Configuration @EnableLoadTimeWeaving(aspectjWeaving=AspectJWeaving.ENABLED) static class EnableLTWConfig_withAjWeavingEnabled implements LoadTimeWeavingConfigurer { + @Override public LoadTimeWeaver getLoadTimeWeaver() { return mock(LoadTimeWeaver.class); } } + }