diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java index efba8139a2..ec46587699 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java @@ -49,14 +49,8 @@ public class Pet { if (o == null || getClass() != o.getClass()) { return false; } - - final Pet pet = (Pet) o; - - if (!Objects.equals(name, pet.name)) { - return false; - } - - return true; + Pet pet = (Pet) o; + return Objects.equals(this.name, pet.name); } @Override diff --git a/spring-core/src/main/java/org/springframework/cglib/beans/BeanMap.java b/spring-core/src/main/java/org/springframework/cglib/beans/BeanMap.java index ea547a0c10..7a2a3b6854 100644 --- a/spring-core/src/main/java/org/springframework/cglib/beans/BeanMap.java +++ b/spring-core/src/main/java/org/springframework/cglib/beans/BeanMap.java @@ -1,13 +1,13 @@ /* - * Copyright 2003,2004 The Apache Software Foundation + * Copyright 2002-2023 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 obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and diff --git a/spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java b/spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java index 9a09ca9631..5c85a69272 100644 --- a/spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java @@ -286,10 +286,7 @@ class MappingJackson2MessageConverterTests { return false; } MyBean bean = (MyBean) o; - if (!Objects.equals(foo, bean.foo)) { - return false; - } - return true; + return Objects.equals(this.foo, bean.foo); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java index 7bebac1b32..37a3c279b4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java @@ -276,7 +276,7 @@ class DispatcherHandlerIntegrationTests extends AbstractHttpHandlerIntegrationTe return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java index 94a87c83f2..c7491bc02e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java @@ -147,7 +147,7 @@ class PublisherHandlerFunctionIntegrationTests extends AbstractRouterFunctionInt return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java index b7c8ee2601..a5e65f4612 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java @@ -176,7 +176,7 @@ class SseHandlerFunctionIntegrationTests extends AbstractRouterFunctionIntegrati return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java index 75e70b560d..7cbec1f258 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java @@ -154,7 +154,7 @@ class JacksonStreamingIntegrationTests extends AbstractHttpHandlerIntegrationTes return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java index bb37f42a62..a11a8f8185 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java @@ -713,7 +713,7 @@ class RequestMappingMessageConversionIntegrationTests extends AbstractRequestMap return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java index c9cc979b46..205ff217a8 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java @@ -278,7 +278,7 @@ class SseIntegrationTests extends AbstractHttpHandlerIntegrationTests { return false; } Person person = (Person) o; - return !(!Objects.equals(this.name, person.name)); + return Objects.equals(this.name, person.name); } @Override