From 1c69778b6f41fc565c0613cebbad98ec2ef717b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 10:36:27 +0000 Subject: [PATCH 1/2] chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.8.3 to 4.10.2.0. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.9.8.3...spotbugs-maven-plugin-4.10.2.0) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-version: 4.10.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1e6bdd299..db4c23c394 100644 --- a/pom.xml +++ b/pom.xml @@ -103,7 +103,7 @@ 10.0.0 3.5.1 3.8.0 - 4.9.8.3 + 4.10.2.0 From a0c819500d74c6c72390ec81a689daf46ec305fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 1 Jul 2026 12:56:06 +0200 Subject: [PATCH 2/2] bump: 4.10.2.0 and related fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../operator/migration/RemoveMethodDeclaration.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/migration/src/main/java/io/javaoperatorsdk/operator/migration/RemoveMethodDeclaration.java b/migration/src/main/java/io/javaoperatorsdk/operator/migration/RemoveMethodDeclaration.java index 33841d5acc..62151f469f 100644 --- a/migration/src/main/java/io/javaoperatorsdk/operator/migration/RemoveMethodDeclaration.java +++ b/migration/src/main/java/io/javaoperatorsdk/operator/migration/RemoveMethodDeclaration.java @@ -59,13 +59,13 @@ public J.ClassDeclaration visitClassDeclaration( J.ClassDeclaration classDecl, ExecutionContext ctx) { J.ClassDeclaration cd = super.visitClassDeclaration(classDecl, ctx); - if (cd.getType() == null || !typeMatchesOrImplements(cd.getType())) { + JavaType.FullyQualified type = cd.getType(); + if (type == null || !typeMatchesOrImplements(type)) { return cd; } // Mutate the type info in place to remove the method from the declared methods list, // so all AST nodes sharing this type reference stay consistent. - var type = cd.getType(); if (type instanceof JavaType.Class classType) { var updatedMethods = classType.getMethods().stream().filter(m -> !m.getName().equals(methodName)).toList(); @@ -90,11 +90,16 @@ public J.MethodDeclaration visitMethodDeclaration( } J.ClassDeclaration classDecl = getCursor().firstEnclosing(J.ClassDeclaration.class); - if (classDecl == null || classDecl.getType() == null) { + if (classDecl == null) { return super.visitMethodDeclaration(method, ctx); } - if (typeMatchesOrImplements(classDecl.getType())) { + JavaType.FullyQualified type = classDecl.getType(); + if (type == null) { + return super.visitMethodDeclaration(method, ctx); + } + + if (typeMatchesOrImplements(type)) { //noinspection DataFlowIssue return null; }