GH-3418: Fix Poller Undeclared Checked Exceptions
Resolves https://github.com/spring-projects/spring-integration/issues/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
This commit is contained in:
committed by
Artem Bilan
parent
90196767db
commit
b1932942cf
@@ -48,6 +48,7 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ErrorHandler;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
@@ -252,7 +253,7 @@ public abstract class AbstractPollingEndpoint extends AbstractEndpoint implement
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
throw (RuntimeException) e;
|
||||
ReflectionUtils.rethrowRuntimeException(e);
|
||||
}
|
||||
}
|
||||
boolean result;
|
||||
|
||||
Reference in New Issue
Block a user