Skip to content

Commit 0aff403

Browse files
committed
Merge pull request #42901 from ngocnhan-tran1996
* pr/42901: Update copyright year of changed files Remove redundant null check Closes gh-42901
2 parents 7a185a0 + eba7a5a commit 0aff403

File tree

2 files changed

+4
-4
lines changed
  • spring-boot-project
    • spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito
    • spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor

2 files changed

+4
-4
lines changed

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/QualifierDefinition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@ public int hashCode() {
7878
}
7979

8080
static QualifierDefinition forElement(AnnotatedElement element) {
81-
if (element != null && element instanceof Field field) {
81+
if (element instanceof Field field) {
8282
Set<Annotation> annotations = getQualifierAnnotations(field);
8383
if (!annotations.isEmpty()) {
8484
return new QualifierDefinition(field, annotations);

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/PropertyDescriptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -176,7 +176,7 @@ private boolean isParentTheSame(MetadataGenerationEnvironment environment, Eleme
176176
}
177177
returnType = getTopLevelType(returnType);
178178
Element candidate = element;
179-
while (candidate != null && candidate instanceof TypeElement) {
179+
while (candidate instanceof TypeElement) {
180180
if (returnType.equals(getTopLevelType(candidate))) {
181181
return true;
182182
}

0 commit comments

Comments
 (0)