diff --git a/spring-integration-core/src/main/java/org/springframework/integration/support/converter/AllowListDeserializingConverter.java b/spring-integration-core/src/main/java/org/springframework/integration/support/converter/AllowListDeserializingConverter.java index 0963712f00..3788359378 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/support/converter/AllowListDeserializingConverter.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/support/converter/AllowListDeserializingConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 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. @@ -26,7 +26,6 @@ import java.util.Set; import org.springframework.beans.DirectFieldAccessor; import org.springframework.core.ConfigurableObjectInputStream; -import org.springframework.core.NestedIOException; import org.springframework.core.convert.converter.Converter; import org.springframework.core.serializer.DefaultDeserializer; import org.springframework.core.serializer.Deserializer; @@ -169,7 +168,7 @@ public class AllowListDeserializingConverter implements Converter { return true; } catch (SftpException e) { - throw new NestedIOException("Failed to remove file.", e); + throw new IOException("Failed to remove file.", e); } } @@ -120,7 +119,7 @@ public class SftpSession implements Session { } } catch (SftpException e) { - throw new NestedIOException("Failed to list files", e); + throw new IOException("Failed to list files", e); } return new LsEntry[0]; } @@ -148,7 +147,7 @@ public class SftpSession implements Session { FileCopyUtils.copy(is, os); } catch (SftpException e) { - throw new NestedIOException("failed to read file " + source, e); + throw new IOException("failed to read file " + source, e); } } @@ -158,7 +157,7 @@ public class SftpSession implements Session { return this.channel.get(source); } catch (SftpException e) { - throw new NestedIOException("failed to read file " + source, e); + throw new IOException("failed to read file " + source, e); } } @@ -174,7 +173,7 @@ public class SftpSession implements Session { this.channel.put(inputStream, destination); } catch (SftpException e) { - throw new NestedIOException("failed to write file", e); + throw new IOException("failed to write file", e); } } @@ -185,7 +184,7 @@ public class SftpSession implements Session { this.channel.put(inputStream, destination, ChannelSftp.APPEND); } catch (SftpException e) { - throw new NestedIOException("failed to write file", e); + throw new IOException("failed to write file", e); } } @@ -227,7 +226,7 @@ public class SftpSession implements Session { } } catch (IOException ioex) { - NestedIOException exception = new NestedIOException("Failed to delete file " + pathTo, sftpex); + IOException exception = new IOException("Failed to delete file " + pathTo, sftpex); exception.addSuppressed(ioex); throw exception; // NOSONAR - added to suppressed exceptions } @@ -236,8 +235,8 @@ public class SftpSession implements Session { this.channel.rename(pathFrom, pathTo); } catch (SftpException sftpex2) { - NestedIOException exception = - new NestedIOException("failed to rename from " + pathFrom + " to " + pathTo, sftpex); + IOException exception = + new IOException("failed to rename from " + pathFrom + " to " + pathTo, sftpex); exception.addSuppressed(sftpex2); throw exception; // NOSONAR - added to suppressed exceptions } @@ -254,7 +253,7 @@ public class SftpSession implements Session { } catch (SftpException ex) { if (ex.id != ChannelSftp.SSH_FX_FAILURE || !exists(remoteDirectory)) { - throw new NestedIOException("failed to create remote directory '" + remoteDirectory + "'.", ex); + throw new IOException("failed to create remote directory '" + remoteDirectory + "'.", ex); } } return true; @@ -266,7 +265,7 @@ public class SftpSession implements Session { this.channel.rmdir(remoteDirectory); } catch (SftpException e) { - throw new NestedIOException("failed to remove remote directory '" + remoteDirectory + "'.", e); + throw new IOException("failed to remove remote directory '" + remoteDirectory + "'.", e); } return true; } diff --git a/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ClientWebSocketContainer.java b/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ClientWebSocketContainer.java index 025d5240ef..8ebe61bca7 100644 --- a/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ClientWebSocketContainer.java +++ b/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ClientWebSocketContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2020 the original author or authors. + * Copyright 2014-2022 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. @@ -272,7 +272,7 @@ public final class ClientWebSocketContainer extends IntegrationWebSocketContaine } @Override - protected boolean isConnected() { + public boolean isConnected() { return ((ClientWebSocketContainer.this.clientSession != null) && (ClientWebSocketContainer.this.clientSession.isOpen())); } diff --git a/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ServerWebSocketContainer.java b/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ServerWebSocketContainer.java index 815c048e67..de7b648cfb 100644 --- a/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ServerWebSocketContainer.java +++ b/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ServerWebSocketContainer.java @@ -195,7 +195,7 @@ public class ServerWebSocketContainer extends IntegrationWebSocketContainer .acceptIfNotNull(this.sockJsServiceOptions.messageCodec, sockJsServiceRegistration::setMessageCodec) .acceptIfNotNull(this.sockJsServiceOptions.suppressCors, - sockJsServiceRegistration::setSupressCors); + sockJsServiceRegistration::setSuppressCors); } }