Skip to content

Commit b193294

Browse files
garyrussellartembilan
authored andcommitted
GH-3418: Fix Poller Undeclared Checked Exceptions
Resolves #3418 `Class.newInstance()` can propagate checked exceptions that are not declared. **cherry-pick/back-port to 5.3.x, 5.2.x, 4.3.x** # Conflicts: # spring-integration-core/src/main/java/org/springframework/integration/endpoint/AbstractPollingEndpoint.java
1 parent 9019676 commit b193294

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-integration-core/src/main/java/org/springframework/integration/endpoint/AbstractPollingEndpoint.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.springframework.util.ClassUtils;
4949
import org.springframework.util.CollectionUtils;
5050
import org.springframework.util.ErrorHandler;
51+
import org.springframework.util.ReflectionUtils;
5152

5253
/**
5354
* @author Mark Fisher
@@ -252,7 +253,7 @@ private boolean doPoll() {
252253
return false;
253254
}
254255
else {
255-
throw (RuntimeException) e;
256+
ReflectionUtils.rethrowRuntimeException(e);
256257
}
257258
}
258259
boolean result;

0 commit comments

Comments
 (0)