-
Bug
-
Resolution: Fixed
-
Minor
-
None
Remoting versions since 3.11 have explicit annotations for Channel#getCurrent(), and there are lots of FindBugs issues reported due to that. All usages are safe, so there is no need in backporting.
My proposal is to...
1) Add a convenience default method to Remoting's Callable, which throws IOException
2) Use the new convenience method in all Callable implementations in the core
Code changed in jenkins
User: Oleg Nenashev
Path:
src/main/java/hudson/remoting/Callable.java
src/main/java/hudson/remoting/RemoteInvocationHandler.java
src/main/java/hudson/remoting/forward/PortForwarder.java
src/main/java/org/jenkinsci/remoting/ChannelStateException.java
src/test/java/hudson/remoting/ChannelTest.java
src/test/java/hudson/remoting/ClassRemotingTest.java
src/test/java/org/jenkinsci/remoting/protocol/ProtocolStackImplTest.java
http://jenkins-ci.org/commit/remoting/df3dc722364651238c948c1a6b45660467580ce4
Log:
JENKINS-48055- Introduce convenient Channel retrieval methods in Callables.This change introduces new API, which is expected to cleanup FindBugs reports in the core and to offer better diagnostics of edge cases.
The logic also allows failing fast when the channel is being terminated.