Skip to content

Commit 0dc68a1

Browse files
committed
refactor(exception): replace NestedIOException with IOException during upgrade of spring boot 3.0.x
While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-crypto module: ``` > Task :kork-crypto:compileJava FAILED /kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:20: error: cannot find symbol import org.springframework.core.NestedIOException; ^ symbol: class NestedIOException location: package org.springframework.core /kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:22: error: cannot find symbol public class NestedSecurityIOException extends NestedIOException { ^ symbol: class NestedIOException 2 errors ``` The root cause is the removal of `org.springframework.core.NestedIOException` from springframework 6.0, as mentioned in the below links: spring-projects/spring-framework#28198 spring-projects/spring-framework#28929 So, replacing `org.springframework.core.NestedIOException` with `java.io.IOException`.
1 parent 828a55d commit 0dc68a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
package com.netflix.spinnaker.kork.crypto;
1818

19+
import java.io.IOException;
1920
import java.security.GeneralSecurityException;
20-
import org.springframework.core.NestedIOException;
2121

22-
public class NestedSecurityIOException extends NestedIOException {
22+
public class NestedSecurityIOException extends IOException {
2323
public NestedSecurityIOException(GeneralSecurityException e) {
2424
super(e.getMessage(), e);
2525
}

0 commit comments

Comments
 (0)