• Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • remoting

      I would like to cleanup FindBugs in remoting by Remoting 3.0.
      Actually the plan is to perform the most of the fixes in Remoting 2 stabilization branch and then merge them towards 3.0

      Current state in the master branch:

      [INFO] BugInstance size is 54
      [INFO] Error size is 0
      [INFO] Total bugs: 54
      [INFO] Wait not in loop in hudson.remoting.AsyncFutureImpl.get(long, TimeUnit) [hudson.remoting.AsyncFutureImpl] At AsyncFutureImpl.java:[line 83] WA_NOT_IN_LOOP
      [INFO] hudson.remoting.Capability.read(InputStream) may fail to close stream [hudson.remoting.Capability] At Capability.java:[line 124] OS_OPEN_STREAM
      [INFO] hudson.remoting.Capability.writePreamble(OutputStream) may fail to close stream [hudson.remoting.Capability] At Capability.java:[line 114] OS_OPEN_STREAM
      [INFO] hudson.remoting.Channel.getProperty(ChannelProperty) is unsynchronized, hudson.remoting.Channel.setProperty(Object, Object) is synchronized [hudson.remoting.Channel] At Channel.java:[line 1210] UG_SYNC_SET_UNSYNC_GET
      [INFO] hudson.remoting.ChannelBuilder.getProperties() may expose internal representation by returning ChannelBuilder.properties [hudson.remoting.ChannelBuilder] At ChannelBuilder.java:[line 277] EI_EXPOSE_REP
      [INFO] Return value of putIfAbsent is ignored, but checksum is reused in hudson.remoting.Checksum.calculateFor(URL) [hudson.remoting.Checksum] At Checksum.java:[line 111] RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED
      [INFO] Private method hudson.remoting.ChunkedOutputStream.frameSize() is never called [hudson.remoting.ChunkedOutputStream] At ChunkedOutputStream.java:[line 34] UPM_UNCALLED_PRIVATE_METHOD
      [INFO] Non serializable hudson.remoting.RemoteClassLoader$IClassLoader written to ObjectOutput in hudson.remoting.ClassLoaderHolder.writeObject(ObjectOutputStream) [hudson.remoting.ClassLoaderHolder] At ClassLoaderHolder.java:[line 44] DMI_NONSERIALIZABLE_OBJECT_WRITTEN
      [INFO] hudson.remoting.DiagnosedStreamCorruptionException.getReadAhead() may expose internal representation by returning DiagnosedStreamCorruptionException.readAhead [hudson.remoting.DiagnosedStreamCorruptionException] At DiagnosedStreamCorruptionException.java:[line 33] EI_EXPOSE_REP
      [INFO] hudson.remoting.DiagnosedStreamCorruptionException.getReadBack() may expose internal representation by returning DiagnosedStreamCorruptionException.readBack [hudson.remoting.DiagnosedStreamCorruptionException] At DiagnosedStreamCorruptionException.java:[line 29] EI_EXPOSE_REP
      [INFO] Unwritten field: hudson.remoting.ExportTable$Entry.recorder [hudson.remoting.ExportTable$Entry] At ExportTable.java:[line 110] UWF_UNWRITTEN_FIELD
      [INFO] hudson.remoting.ExportTable$ExportList is serializable but also an inner class of a non-serializable class [hudson.remoting.ExportTable$ExportList] At ExportTable.java:[lines 241-255] SE_BAD_FIELD_INNER_CLASS
      [INFO] Return value of Throwable.getStackTrace() ignored, but method has no side effect [hudson.remoting.ExportTable$Source] At ExportTable.java:[line 211] RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT
      [INFO] Exceptional return value of java.io.File.setLastModified(long) ignored in hudson.remoting.FileSystemJarCache.lookInCache(Channel, long, long) [hudson.remoting.FileSystemJarCache] At FileSystemJarCache.java:[line 53] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.delete() ignored in hudson.remoting.FileSystemJarCache.retrieve(Channel, long, long) [hudson.remoting.FileSystemJarCache] At FileSystemJarCache.java:[line 113] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] hudson.remoting.InitializeJarCacheMain.copyFile(File, File) may fail to clean up java.io.OutputStream on checked exception [hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain] Obligation to clean up resource created at InitializeJarCacheMain.java:[line 69] is not dischargedPath continues at InitializeJarCacheMain.java:[line 70]Path continues at InitializeJarCacheMain.java:[line 72]Path continues at InitializeJarCacheMain.java:[line 76]Path continues at InitializeJarCacheMain.java:[line 77] OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE
      [INFO] hudson.remoting.InitializeJarCacheMain.copyFile(File, File) may fail to close stream on exception [hudson.remoting.InitializeJarCacheMain] At InitializeJarCacheMain.java:[line 69] OS_OPEN_STREAM_EXCEPTION_PATH
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.JarCacheSupport.resolve(Channel, long, long) [hudson.remoting.JarCacheSupport] At JarCacheSupport.java:[line 61] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.Launcher.addClasspath(String) [hudson.remoting.Launcher] At Launcher.java:[line 131] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Unread field: hudson.remoting.PipeWindow$Real.key [hudson.remoting.PipeWindow$Real] At PipeWindow.java:[line 176] URF_UNREAD_FIELD
      [INFO] The field hudson.remoting.PreloadJarTask.target is transient but isn't set by deserialization [hudson.remoting.PreloadJarTask] In PreloadJarTask.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] ProxyOutputStream.java:[line 185] is set to null inside finalize method in hudson.remoting.ProxyOutputStream [hudson.remoting.ProxyOutputStream] At ProxyOutputStream.java:[line 185] FI_FINALIZER_NULLS_FIELDS
      [INFO] ProxyWriter.java:[line 200] is set to null inside finalize method in hudson.remoting.ProxyWriter [hudson.remoting.ProxyWriter] At ProxyWriter.java:[line 200] FI_FINALIZER_NULLS_FIELDS
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.channel; locked 64% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 167]Unsynchronized access at ProxyWriter.java:[line 167]Unsynchronized access at ProxyWriter.java:[line 168]Unsynchronized access at ProxyWriter.java:[line 168]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 186]Synchronized access at ProxyWriter.java:[line 111]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 180]Synchronized access at ProxyWriter.java:[line 78]Synchronized access at ProxyWriter.java:[line 82] IS2_INCONSISTENT_SYNC
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.oid; locked 80% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 168]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 187]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 83] IS2_INCONSISTENT_SYNC
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.closed; locked 75% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 102]Synchronized access at ProxyWriter.java:[line 176]Synchronized access at ProxyWriter.java:[line 177]Synchronized access at ProxyWriter.java:[line 93] IS2_INCONSISTENT_SYNC
      [INFO] hudson.remoting.RemoteClassLoader.create(ClassLoader, RemoteClassLoader$IClassLoader) creates a hudson.remoting.RemoteClassLoader classloader, which should be performed within a doPrivileged block [hudson.remoting.RemoteClassLoader] At RemoteClassLoader.java:[line 115] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.RemoteClassLoader.<static initializer for RemoteClassLoader>() [hudson.remoting.RemoteClassLoader] At RemoteClassLoader.java:[line 330] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteClassLoader$ClassFile2.clazz is transient but isn't set by deserialization [hudson.remoting.RemoteClassLoader$ClassFile2] In RemoteClassLoader.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] hudson.remoting.RemoteClassLoader$ClassLoaderProxy.<static initializer for ClassLoaderProxy>() creates a hudson.remoting.RemoteClassLoader$ClassLoaderProxy$1 classloader, which should be performed within a doPrivileged block [hudson.remoting.RemoteClassLoader$ClassLoaderProxy] At RemoteClassLoader.java:[line 996] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteClassLoader$ResourceFile.local is transient but isn't set by deserialization [hudson.remoting.RemoteClassLoader$ResourceFile] In RemoteClassLoader.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(Channel) [hudson.remoting.RemoteInvocationHandler$RPCRequest] At RemoteInvocationHandler.java:[line 884] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteInvocationHandler$RPCRequest.classLoader is transient but isn't set by deserialization [hudson.remoting.RemoteInvocationHandler$RPCRequest] In RemoteInvocationHandler.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.SingleLaneExecutorService.execute(Runnable) [hudson.remoting.SingleLaneExecutorService] At SingleLaneExecutorService.java:[line 105] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.SingleLaneExecutorService$1.run() [hudson.remoting.SingleLaneExecutorService$1] At SingleLaneExecutorService.java:[line 120] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Class hudson.remoting.UserRequest defines non-transient non-serializable instance field classLoaderProxy [hudson.remoting.UserRequest] In UserRequest.java SE_BAD_FIELD
      [INFO] The field hudson.remoting.UserRequest.exports is transient but isn't set by deserialization [hudson.remoting.UserRequest] In UserRequest.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Exceptional return value of java.io.File.delete() ignored in hudson.remoting.Util.createTempDir() [hudson.remoting.Util] At Util.java:[line 81] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.mkdir() ignored in hudson.remoting.Util.createTempDir() [hudson.remoting.Util] At Util.java:[line 82] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.mkdirs() ignored in hudson.remoting.Util.makeResource(String, byte[]) [hudson.remoting.Util] At Util.java:[line 60] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.Which.jarFile(URL, String) [hudson.remoting.Which, hudson.remoting.Which, hudson.remoting.Which, hudson.remoting.Which] At Which.java:[line 144]Another occurrence at Which.java:[line 149]Another occurrence at Which.java:[line 154]Another occurrence at Which.java:[line 204] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Exception is caught when Exception is not thrown in hudson.remoting.Which.jarFile(URL, String) [hudson.remoting.Which] At Which.java:[line 186] REC_CATCH_EXCEPTION
      [INFO] hudson.remoting.jnlp.Main.createEngine() may fail to close stream [hudson.remoting.jnlp.Main] At Main.java:[line 199] OS_OPEN_STREAM
      [INFO] Useless object stored in variable certificates of method hudson.remoting.jnlp.Main.createEngine() [hudson.remoting.jnlp.Main] At Main.java:[line 183] UC_USELESS_OBJECT
      [INFO] Unread public/protected field: org.jenkinsci.remoting.engine.JnlpServer3Handshake.cookie [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 62] URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD
      [INFO] JnlpServer3Handshake.handshakeCiphers not initialized in constructor and dereferenced in org.jenkinsci.remoting.engine.JnlpServer3Handshake.authenticateToSlave() [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 120] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] JnlpServer3Handshake.handshakeCiphers not initialized in constructor and dereferenced in org.jenkinsci.remoting.engine.JnlpServer3Handshake.validateSlave() [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 139] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] Exceptional return value of java.util.concurrent.AbstractExecutorService.submit(Runnable) ignored in org.jenkinsci.remoting.nio.NioChannelHub.run() [org.jenkinsci.remoting.nio.NioChannelHub, org.jenkinsci.remoting.nio.NioChannelHub] At NioChannelHub.java:[line 592]Another occurrence at NioChannelHub.java:[line 610] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] NioChannelHub$NioTransport.receiver not initialized in constructor and dereferenced in org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(Throwable) [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport] At NioChannelHub.java:[line 208] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] Class org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$1 defines non-transient non-serializable instance field this$1 [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$1] In NioChannelHub.java SE_BAD_FIELD
      [INFO] Class org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$2 defines non-transient non-serializable instance field this$1 [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$2] In NioChannelHub.java SE_BAD_FIELD
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.create(FileDescriptor) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 118] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.unwrap(InputStream) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 50] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.unwrap(OutputStream) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 70] DP_DO_INSIDE_DO_PRIVILEGED
      

          [JENKINS-37566] FindBugs-clean remoting layer

          Oleg Nenashev added a comment -

          Postponed the release for now. Still need to fix 16 bugs and integrate others

          Oleg Nenashev added a comment - Postponed the release for now. Still need to fix 16 bugs and integrate others

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Launcher.java
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/RemoteInvocationHandler.java
          src/main/java/hudson/remoting/Which.java
          src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java
          src/main/java/org/jenkinsci/remoting/util/ReflectionUtils.java
          src/test/java/org/jenkinsci/remoting/engine/HandlerLoopbackLoadStress.java
          src/test/java/org/jenkinsci/remoting/nio/Main.java
          src/test/java/org/jenkinsci/remoting/protocol/impl/ConnectionHeadersTest.java
          http://jenkins-ci.org/commit/remoting/755473f7e4fa314b17ac8df12cd362635a24e6c3
          Log:
          JENKINS-37566 - Always run setAccessible() in privileged blocks

          Resolves 5 FB issues

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Launcher.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/RemoteInvocationHandler.java src/main/java/hudson/remoting/Which.java src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java src/main/java/org/jenkinsci/remoting/util/ReflectionUtils.java src/test/java/org/jenkinsci/remoting/engine/HandlerLoopbackLoadStress.java src/test/java/org/jenkinsci/remoting/nio/Main.java src/test/java/org/jenkinsci/remoting/protocol/impl/ConnectionHeadersTest.java http://jenkins-ci.org/commit/remoting/755473f7e4fa314b17ac8df12cd362635a24e6c3 Log: JENKINS-37566 - Always run setAccessible() in privileged blocks Resolves 5 FB issues

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/RemoteClassLoader.java
          http://jenkins-ci.org/commit/remoting/a185cb2aca2c4f47505347420cf979193aca4cee
          Log:
          JENKINS-37566 - DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED i RemoteClassLoader

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/RemoteClassLoader.java http://jenkins-ci.org/commit/remoting/a185cb2aca2c4f47505347420cf979193aca4cee Log: JENKINS-37566 - DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED i RemoteClassLoader

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Launcher.java
          src/main/java/org/jenkinsci/remoting/util/ReflectionUtils.java
          http://jenkins-ci.org/commit/remoting/408bc165d43dbf60c97c2e7a61ed747e502451f2
          Log:
          JENKINS-37566 - Fix imports and code formatting

          Compare: https://github.com/jenkinsci/remoting/compare/755473f7e4fa^...408bc165d43d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Launcher.java src/main/java/org/jenkinsci/remoting/util/ReflectionUtils.java http://jenkins-ci.org/commit/remoting/408bc165d43dbf60c97c2e7a61ed747e502451f2 Log: JENKINS-37566 - Fix imports and code formatting Compare: https://github.com/jenkinsci/remoting/compare/755473f7e4fa ^...408bc165d43d

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Which.java
          http://jenkins-ci.org/commit/remoting/574a815537d11d1fbb953d365908ddca2db9bf04
          Log:
          JENKINS-37566 - JBoss magic should really fail if we cannot mark fields as accessible

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Which.java http://jenkins-ci.org/commit/remoting/574a815537d11d1fbb953d365908ddca2db9bf04 Log: JENKINS-37566 - JBoss magic should really fail if we cannot mark fields as accessible

          Oleg Nenashev added a comment -

          Moving to the review state since there are several pending PRs:

          After that there will be only 14 issues left

          Oleg Nenashev added a comment - Moving to the review state since there are several pending PRs: https://github.com/jenkinsci/remoting/pull/109 https://github.com/jenkinsci/remoting/pull/153 https://github.com/jenkinsci/remoting/pull/154 After that there will be only 14 issues left

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ExportTable.java
          http://jenkins-ci.org/commit/remoting/02958b3fd3b58847756396ddbaacc3d5cdf488af
          Log:
          Merge pull request #157 from oleg-nenashev/bug/findbugs_ExportTable

          JENKINS-37566 - FindBugs - Cleanup issues in ExportTable implementation

          Compare: https://github.com/jenkinsci/remoting/compare/865a3f706023...02958b3fd3b5

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ExportTable.java http://jenkins-ci.org/commit/remoting/02958b3fd3b58847756396ddbaacc3d5cdf488af Log: Merge pull request #157 from oleg-nenashev/bug/findbugs_ExportTable JENKINS-37566 - FindBugs - Cleanup issues in ExportTable implementation Compare: https://github.com/jenkinsci/remoting/compare/865a3f706023...02958b3fd3b5

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/ResourceImageInJar.java
          src/main/java/hudson/remoting/URLish.java
          src/main/java/hudson/remoting/Util.java
          http://jenkins-ci.org/commit/remoting/5e1e8883ca94889d8f5598945965f00c4a908912
          Log:
          JENKINS-37566 - Annotate URLish methods and handle NPE in RemoteClassLoader. (#170)

          • JENKINS-37566 - Annotate URLish methods and handle NPE in RemoteClassLoader.

          The NPE seems to be non-realistic (why would RemoteClassloader construct URL from File?), but it’s better to fix it just in case.

          • Make URLish#from() non-null as suggested by @jglick + some Javadoc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/ResourceImageInJar.java src/main/java/hudson/remoting/URLish.java src/main/java/hudson/remoting/Util.java http://jenkins-ci.org/commit/remoting/5e1e8883ca94889d8f5598945965f00c4a908912 Log: JENKINS-37566 - Annotate URLish methods and handle NPE in RemoteClassLoader. (#170) JENKINS-37566 - Annotate URLish methods and handle NPE in RemoteClassLoader. The NPE seems to be non-realistic (why would RemoteClassloader construct URL from File?), but it’s better to fix it just in case. Make URLish#from() non-null as suggested by @jglick + some Javadoc

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          src/main/java/hudson/remoting/CommandTransport.java
          src/main/java/hudson/remoting/ExportedClassLoaderTable.java
          src/main/java/hudson/remoting/MimicException.java
          src/main/java/hudson/remoting/MultiClassLoaderSerializer.java
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/RemoteInvocationHandler.java
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java
          http://jenkins-ci.org/commit/remoting/55326679d16f00754a12ea6facb9892196c897a4
          Log:
          JENKINS-37566 - Annotate methods which may explicitly return `null` (#168)

          • JENKINS-37566 - Annotate methods which may explicitly return `null`

          Just a bulk change of annotations + some Javadoc, no behavior changes

          • JENKINS-37566 - Annotate the MultiClassLoaderSerializer#readClassLoader() method
          • Explicitly Restrict MimicException to prevent external usages.

          Hence we do not care about the make() annotation, I’d gueess

          • Change MimicException#make() annotations to make @stephenc a :happypanda:

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/CommandTransport.java src/main/java/hudson/remoting/ExportedClassLoaderTable.java src/main/java/hudson/remoting/MimicException.java src/main/java/hudson/remoting/MultiClassLoaderSerializer.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/RemoteInvocationHandler.java src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java http://jenkins-ci.org/commit/remoting/55326679d16f00754a12ea6facb9892196c897a4 Log: JENKINS-37566 - Annotate methods which may explicitly return `null` (#168) JENKINS-37566 - Annotate methods which may explicitly return `null` Just a bulk change of annotations + some Javadoc, no behavior changes JENKINS-37566 - Annotate the MultiClassLoaderSerializer#readClassLoader() method Explicitly Restrict MimicException to prevent external usages. Hence we do not care about the make() annotation, I’d gueess Change MimicException#make() annotations to make @stephenc a :happypanda:

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          src/main/java/hudson/remoting/CommandTransport.java
          src/main/java/hudson/remoting/ExportedClassLoaderTable.java
          src/main/java/hudson/remoting/MimicException.java
          src/main/java/hudson/remoting/MultiClassLoaderSerializer.java
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/RemoteInvocationHandler.java
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java
          http://jenkins-ci.org/commit/remoting/469088efd43cb657ca635fbe65396c6e675fccdd
          Log:
          Revert "JENKINS-37566 - Annotate methods which may explicitly return `null` (#168)"

          This reverts commit 55326679d16f00754a12ea6facb9892196c897a4.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/CommandTransport.java src/main/java/hudson/remoting/ExportedClassLoaderTable.java src/main/java/hudson/remoting/MimicException.java src/main/java/hudson/remoting/MultiClassLoaderSerializer.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/RemoteInvocationHandler.java src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java src/main/java/org/jenkinsci/remoting/nio/SelectableFileChannelFactory.java http://jenkins-ci.org/commit/remoting/469088efd43cb657ca635fbe65396c6e675fccdd Log: Revert " JENKINS-37566 - Annotate methods which may explicitly return `null` (#168)" This reverts commit 55326679d16f00754a12ea6facb9892196c897a4.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/findbugs/excludeFilter.xml
          src/main/java/hudson/remoting/AbstractByteArrayCommandTransport.java
          src/main/java/hudson/remoting/Capability.java
          src/main/java/hudson/remoting/Channel.java
          src/main/java/hudson/remoting/ChannelBuilder.java
          src/main/java/hudson/remoting/ChunkedOutputStream.java
          src/main/java/hudson/remoting/ClassLoaderHolder.java
          src/main/java/hudson/remoting/DiagnosedStreamCorruptionException.java
          src/main/java/hudson/remoting/ExportTable.java
          src/main/java/hudson/remoting/FileSystemJarCache.java
          src/main/java/hudson/remoting/InitializeJarCacheMain.java
          src/main/java/hudson/remoting/PipeWindow.java
          src/main/java/hudson/remoting/PreloadJarTask.java
          src/main/java/hudson/remoting/ProxyWriter.java
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/RemoteInvocationHandler.java
          src/main/java/hudson/remoting/UserRequest.java
          src/main/java/hudson/remoting/Util.java
          src/main/java/hudson/remoting/Which.java
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          src/main/java/org/jenkinsci/remoting/nio/NioChannelHub.java
          http://jenkins-ci.org/commit/remoting/49c67eef8616c7bc3588263d4ecc2dbcb51d5bb8
          Log:
          JENKINS-37566 - FindBugs Cleanup. Part #1 (#109)

          • JENKINS-37566 - FindBugs: Unclosed stream in hudson.remoting.Capability
          • JENKINS-37566 - FindBugs: Stream not closed on Exception path in InitializeJarCacheMain#copyFile
          • Extra Util#makeResource() polishing
          • Deprecate obsolete Util#mkdirs()
          • Exceptional case in setLastModifiedTime
          • Handle exception case during temp file deletion in FileSystemJarCache
          • Synchronize ProxyWriter#closed in write()
          • Synchronization of ProxyWriter#channel
          • Get rid of the obsolete collection in Channel#properties, fix synchronization
          • Checksum#calculateFor() - no need to put if absent since there is a check above
          • UWF_UNWRITTEN_FIELD in ExportTable$Entry
          • NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE in JnlpAgentEndpointResolver.
            Now we use a more agressive check
          • UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR in org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort
          • UPM_UNCALLED_PRIVATE_METHOD - hudson.remoting.ChunkedOutputStream.frameSize()
          • FindBugs: Revert the stream closure at emoting Capability, just a design to be reworked
          • Unrealistic NP_NULL_ON_SOME_PATH in NioChannelHub
          • EI_EXPOSE_REP in DiagnosedStreamCorruptionException (diagnostics code)
          • SE_TRANSIENT_FIELD_NOT_RESTORED in PreloadJarTask, RemoteClassLoader, RemoteInvocationHandler and UserRequest
          • Leftover false-positive UG_SYNC_SET_UNSYNC_GET in Channel
          • EI_EXPOSE_REP in ChannelBuilder#properties
          • Suppress DMI_NONSERIALIZABLE_OBJECT_WRITTEN in ClassLoaderHolder#writeObject()
          • Better handling of Streams in hudson.remoting.Capability (still weird)
          • Fix the Util#makeResource() behavior for nested folders
          • FileSystemJarCache: tmp file may be renamed
          • JENKINS-37566 - Modification of Channel#dumpDiagnostics() actually is not required after the merge of #122
          • Disable DP_DO_INSIDE_DO_PRIVILEGED as per feeback from @kohsue in #118
          • Fix the FindBugs filter
          • [NP_NULL_ON_SOME_PATH] - Prevent NPE in ExportTable#diagnoseInvalidObjectId()
          • [RV_RETURN_VALUE_IGNORED_BAD_PRACTICE] - Propagate exceptions when FileSystemJarCache#retrieve() fails to retrieve the target
          • [DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED] - Ignore the warning as per discussion in #118
          • [VO_VOLATILE_INCREMENT] - Suppress warning in Channel#send()
          • FindBugs - Which#jarFile() should not suppress all exceptions
          • FindBugs - Suppress URF_UNREAD_FIELD in Pipewindow#Real
          • JENKINS-37566 - Channel#properties should be a ConcurrentHashMap

          Reason - prevent possible delays and deadlocks in the getter method.
          Addresses the feedback from @stephenc

          • JENKINS-37566 - DiagnosedStreamCorruptionException readAhead/readBack handlers should use a more efficient clone() command
          • JENKINS-37566 - Suppress UG_SYNC_SET_UNSYNC_GET after switching to the ConcurrentHashMap
          • JENKINS-37566 - hudson.remoting.Util should be tolerant against InvalidPathException
          • JENKINS-37566 - make ProxyWriter more asynchronous (follow-up to @stephenc’s review)
          • JENKINS-37566 - Add a comment about race condition as suggested by @stephenc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/findbugs/excludeFilter.xml src/main/java/hudson/remoting/AbstractByteArrayCommandTransport.java src/main/java/hudson/remoting/Capability.java src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/ChannelBuilder.java src/main/java/hudson/remoting/ChunkedOutputStream.java src/main/java/hudson/remoting/ClassLoaderHolder.java src/main/java/hudson/remoting/DiagnosedStreamCorruptionException.java src/main/java/hudson/remoting/ExportTable.java src/main/java/hudson/remoting/FileSystemJarCache.java src/main/java/hudson/remoting/InitializeJarCacheMain.java src/main/java/hudson/remoting/PipeWindow.java src/main/java/hudson/remoting/PreloadJarTask.java src/main/java/hudson/remoting/ProxyWriter.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/RemoteInvocationHandler.java src/main/java/hudson/remoting/UserRequest.java src/main/java/hudson/remoting/Util.java src/main/java/hudson/remoting/Which.java src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java src/main/java/org/jenkinsci/remoting/nio/NioChannelHub.java http://jenkins-ci.org/commit/remoting/49c67eef8616c7bc3588263d4ecc2dbcb51d5bb8 Log: JENKINS-37566 - FindBugs Cleanup. Part #1 (#109) JENKINS-37566 - FindBugs: Unclosed stream in hudson.remoting.Capability JENKINS-37566 - FindBugs: Stream not closed on Exception path in InitializeJarCacheMain#copyFile JENKINS-37566 - Fix Util#makeResource and remove obsolete hack Extra Util#makeResource() polishing Deprecate obsolete Util#mkdirs() Exceptional case in setLastModifiedTime Handle exception case during temp file deletion in FileSystemJarCache Synchronize ProxyWriter#closed in write() Synchronization of ProxyWriter#channel Get rid of the obsolete collection in Channel#properties, fix synchronization Checksum#calculateFor() - no need to put if absent since there is a check above UWF_UNWRITTEN_FIELD in ExportTable$Entry NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE in JnlpAgentEndpointResolver. Now we use a more agressive check UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR in org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort UPM_UNCALLED_PRIVATE_METHOD - hudson.remoting.ChunkedOutputStream.frameSize() FindBugs: Revert the stream closure at emoting Capability, just a design to be reworked Unrealistic NP_NULL_ON_SOME_PATH in NioChannelHub EI_EXPOSE_REP in DiagnosedStreamCorruptionException (diagnostics code) SE_TRANSIENT_FIELD_NOT_RESTORED in PreloadJarTask, RemoteClassLoader, RemoteInvocationHandler and UserRequest Leftover false-positive UG_SYNC_SET_UNSYNC_GET in Channel EI_EXPOSE_REP in ChannelBuilder#properties Suppress DMI_NONSERIALIZABLE_OBJECT_WRITTEN in ClassLoaderHolder#writeObject() Better handling of Streams in hudson.remoting.Capability (still weird) Fix the Util#makeResource() behavior for nested folders FileSystemJarCache: tmp file may be renamed JENKINS-37566 - Modification of Channel#dumpDiagnostics() actually is not required after the merge of #122 Disable DP_DO_INSIDE_DO_PRIVILEGED as per feeback from @kohsue in #118 Fix the FindBugs filter [NP_NULL_ON_SOME_PATH] - Prevent NPE in ExportTable#diagnoseInvalidObjectId() [RV_RETURN_VALUE_IGNORED_BAD_PRACTICE] - Propagate exceptions when FileSystemJarCache#retrieve() fails to retrieve the target [DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED] - Ignore the warning as per discussion in #118 [VO_VOLATILE_INCREMENT] - Suppress warning in Channel#send() FindBugs - Which#jarFile() should not suppress all exceptions FindBugs - Suppress URF_UNREAD_FIELD in Pipewindow#Real JENKINS-37566 - Channel#properties should be a ConcurrentHashMap Reason - prevent possible delays and deadlocks in the getter method. Addresses the feedback from @stephenc JENKINS-37566 - DiagnosedStreamCorruptionException readAhead/readBack handlers should use a more efficient clone() command JENKINS-37566 - Suppress UG_SYNC_SET_UNSYNC_GET after switching to the ConcurrentHashMap JENKINS-37566 - hudson.remoting.Util should be tolerant against InvalidPathException JENKINS-37566 - make ProxyWriter more asynchronous (follow-up to @stephenc’s review) JENKINS-37566 - Add a comment about race condition as suggested by @stephenc

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          http://jenkins-ci.org/commit/remoting/274d4259ef09329e121afd229d635e4086fa227e
          Log:
          JENKINS-37566 - FindBugs: Stop using inefficient iterator logic.

          I doubt it improves performance much, but makes sense to fix it anyway.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java http://jenkins-ci.org/commit/remoting/274d4259ef09329e121afd229d635e4086fa227e Log: JENKINS-37566 - FindBugs: Stop using inefficient iterator logic. I doubt it improves performance much, but makes sense to fix it anyway.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
          http://jenkins-ci.org/commit/remoting/9bbab053f83cf79b923d5c09874ab32d7a4ff5ea
          Log:
          Merge pull request #213 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-inefficient-iterator

          JENKINS-37566 - FindBugs: Stop using inefficient iterator logic.

          Compare: https://github.com/jenkinsci/remoting/compare/e733f7051ee3...9bbab053f83c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java http://jenkins-ci.org/commit/remoting/9bbab053f83cf79b923d5c09874ab32d7a4ff5ea Log: Merge pull request #213 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -inefficient-iterator JENKINS-37566 - FindBugs: Stop using inefficient iterator logic. Compare: https://github.com/jenkinsci/remoting/compare/e733f7051ee3...9bbab053f83c

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/bcd0b2c72bf8c55b7d4997e142954c149b7d4faa
          Log:
          Update Remoting from 3.13. to 3.14

          Fixes JENKINS-45294, JENKINS-47425, JENKINS-47901, JENKINS-47942 + about 50 reported FindBugs issues (JENKINS-37566). There are 13 FindBugs issues left, work in progress.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/bcd0b2c72bf8c55b7d4997e142954c149b7d4faa Log: Update Remoting from 3.13. to 3.14 Fixes JENKINS-45294 , JENKINS-47425 , JENKINS-47901 , JENKINS-47942 + about 50 reported FindBugs issues ( JENKINS-37566 ). There are 13 FindBugs issues left, work in progress.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ClassFilter.java
          http://jenkins-ci.org/commit/remoting/1d3b294b29edb3e85d66885e336ba0ac5e29798a
          Log:
          JENKINS-37566 - Get rid of the dead store in RegExpClassFilter#add()

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ClassFilter.java http://jenkins-ci.org/commit/remoting/1d3b294b29edb3e85d66885e336ba0ac5e29798a Log: JENKINS-37566 - Get rid of the dead store in RegExpClassFilter#add()

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ClassFilter.java
          http://jenkins-ci.org/commit/remoting/239f63583815f720e1f4aea549319205e935ed4a
          Log:
          Merge pull request #217 from oleg-nenashev/findbugs-cleanup/ClassFilter-dead-store

          JENKINS-37566 - Get rid of the dead store in RegExpClassFilter#add()

          Compare: https://github.com/jenkinsci/remoting/compare/02fc0a8612e8...239f63583815

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ClassFilter.java http://jenkins-ci.org/commit/remoting/239f63583815f720e1f4aea549319205e935ed4a Log: Merge pull request #217 from oleg-nenashev/findbugs-cleanup/ClassFilter-dead-store JENKINS-37566 - Get rid of the dead store in RegExpClassFilter#add() Compare: https://github.com/jenkinsci/remoting/compare/02fc0a8612e8...239f63583815

          Oleg Nenashev added a comment -

          In Remoting 3.14 there are only 12 warnings left

          Oleg Nenashev added a comment - In Remoting 3.14 there are only 12 warnings left

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ProxyOutputStream.java
          http://jenkins-ci.org/commit/remoting/f5caca4777c85169f5d1c86a252c46ed49d75eb6
          Log:
          JENKINS-37566 - Stop nullifying channel in ProxyOutputStream#finalize().

          Just YAGNI, it does not help garbage collector much and actually makes it more complicated due to breaking the object chain.
          .

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ProxyOutputStream.java http://jenkins-ci.org/commit/remoting/f5caca4777c85169f5d1c86a252c46ed49d75eb6 Log: JENKINS-37566 - Stop nullifying channel in ProxyOutputStream#finalize(). Just YAGNI, it does not help garbage collector much and actually makes it more complicated due to breaking the object chain. .

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ProxyOutputStream.java
          http://jenkins-ci.org/commit/remoting/d620065439163b9d13708730f2eb93c0bfafcba0
          Log:
          JENKINS-37566 - ProxyOutputStream: Add oid check as suggested by @stephenc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ProxyOutputStream.java http://jenkins-ci.org/commit/remoting/d620065439163b9d13708730f2eb93c0bfafcba0 Log: JENKINS-37566 - ProxyOutputStream: Add oid check as suggested by @stephenc

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/ProxyOutputStream.java
          http://jenkins-ci.org/commit/remoting/385744f028070b2afb57849fa435ae0e4b3a97b8
          Log:
          Merge pull request #232 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-ProxyOutputStream-finalizer

          JENKINS-37566 - Stop nullifying channel in ProxyOutputStream#finalize()

          Compare: https://github.com/jenkinsci/remoting/compare/2d5624c9df15...385744f02807

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ProxyOutputStream.java http://jenkins-ci.org/commit/remoting/385744f028070b2afb57849fa435ae0e4b3a97b8 Log: Merge pull request #232 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -ProxyOutputStream-finalizer JENKINS-37566 - Stop nullifying channel in ProxyOutputStream#finalize() Compare: https://github.com/jenkinsci/remoting/compare/2d5624c9df15...385744f02807

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/UserRequest.java
          http://jenkins-ci.org/commit/remoting/5290e26afde6751004ad2d5c2ae7f13eb5c7b425
          Log:
          JENKINS-37566 - FindBugs: Suppress serialization warning for UserRequest#classLoaderProxy.

          The field is actually always serializable, but we cannot confirm it statically due to the reflection code.
          I decided to just suppress it for now and to document the method.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/UserRequest.java http://jenkins-ci.org/commit/remoting/5290e26afde6751004ad2d5c2ae7f13eb5c7b425 Log: JENKINS-37566 - FindBugs: Suppress serialization warning for UserRequest#classLoaderProxy. The field is actually always serializable, but we cannot confirm it statically due to the reflection code. I decided to just suppress it for now and to document the method.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/RemoteClassLoader.java
          src/main/java/hudson/remoting/UserRequest.java
          http://jenkins-ci.org/commit/remoting/cc6bfabe27b8c53c840764e347c20a41b7ee73e7
          Log:
          Merge pull request #229 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-RemoteClassLoderExport

          JENKINS-37566 - FindBugs: Suppress serialization warning for UserRequest#classLoaderProxy.

          Compare: https://github.com/jenkinsci/remoting/compare/385744f02807...cc6bfabe27b8

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/UserRequest.java http://jenkins-ci.org/commit/remoting/cc6bfabe27b8c53c840764e347c20a41b7ee73e7 Log: Merge pull request #229 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -RemoteClassLoderExport JENKINS-37566 - FindBugs: Suppress serialization warning for UserRequest#classLoaderProxy. Compare: https://github.com/jenkinsci/remoting/compare/385744f02807...cc6bfabe27b8

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/94250ec1caae0ed6d3096e7002e0c2fd42c557e1
          Log:
          Update Remoting from 3.13. to 3.14

          Fixes JENKINS-45294, JENKINS-47425, JENKINS-47901, JENKINS-47942 + about 50 reported FindBugs issues (JENKINS-37566). There are 13 FindBugs issues left, work in progress.

          (cherry picked from commit bcd0b2c72bf8c55b7d4997e142954c149b7d4faa)

          Compare: https://github.com/jenkinsci/jenkins/compare/c624f66dc408...94250ec1caae

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/94250ec1caae0ed6d3096e7002e0c2fd42c557e1 Log: Update Remoting from 3.13. to 3.14 Fixes JENKINS-45294 , JENKINS-47425 , JENKINS-47901 , JENKINS-47942 + about 50 reported FindBugs issues ( JENKINS-37566 ). There are 13 FindBugs issues left, work in progress. (cherry picked from commit bcd0b2c72bf8c55b7d4997e142954c149b7d4faa) Compare: https://github.com/jenkinsci/jenkins/compare/c624f66dc408...94250ec1caae

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          http://jenkins-ci.org/commit/remoting/48ecfeed7919213046f59953c383402e87ad930f
          Log:
          JENKINS-37566 - Channel#waitForProperty() should use wait() with a timeout.

          In the worst case it will cause looping within the loop, but it should be fine in the case of the current implementation.
          It also prevents the infinite lock when the channel cloases and does not send notifyAll() properly.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java http://jenkins-ci.org/commit/remoting/48ecfeed7919213046f59953c383402e87ad930f Log: JENKINS-37566 - Channel#waitForProperty() should use wait() with a timeout. In the worst case it will cause looping within the loop, but it should be fine in the case of the current implementation. It also prevents the infinite lock when the channel cloases and does not send notifyAll() properly.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          http://jenkins-ci.org/commit/remoting/3815aeeae37a9fcf11d427fe209449f45a3c903f
          Log:
          Merge pull request #233 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-Channel_waitofrProperty

          JENKINS-37566 - FindBugs: Channel#waitForProperty() should use wait() with a timeout.

          Compare: https://github.com/jenkinsci/remoting/compare/cc6bfabe27b8...3815aeeae37a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java http://jenkins-ci.org/commit/remoting/3815aeeae37a9fcf11d427fe209449f45a3c903f Log: Merge pull request #233 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -Channel_waitofrProperty JENKINS-37566 - FindBugs: Channel#waitForProperty() should use wait() with a timeout. Compare: https://github.com/jenkinsci/remoting/compare/cc6bfabe27b8...3815aeeae37a

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          src/main/java/hudson/remoting/Command.java
          src/main/java/hudson/remoting/PipeWindow.java
          src/main/java/hudson/remoting/ProxyOutputStream.java
          src/main/java/hudson/remoting/ProxyWriter.java
          src/main/java/hudson/remoting/Request.java
          src/main/java/hudson/remoting/UnexportCommand.java
          http://jenkins-ci.org/commit/remoting/00c2373616ab5136f2cf1a1557e3116944b81e65
          Log:
          JENKINS-37566 - Cleanup issues in Command#createdAt handling

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/Command.java src/main/java/hudson/remoting/PipeWindow.java src/main/java/hudson/remoting/ProxyOutputStream.java src/main/java/hudson/remoting/ProxyWriter.java src/main/java/hudson/remoting/Request.java src/main/java/hudson/remoting/UnexportCommand.java http://jenkins-ci.org/commit/remoting/00c2373616ab5136f2cf1a1557e3116944b81e65 Log: JENKINS-37566 - Cleanup issues in Command#createdAt handling

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          src/main/java/hudson/remoting/Command.java
          src/main/java/hudson/remoting/PipeWindow.java
          src/main/java/hudson/remoting/ProxyOutputStream.java
          src/main/java/hudson/remoting/ProxyWriter.java
          src/main/java/hudson/remoting/Request.java
          src/main/java/hudson/remoting/UnexportCommand.java
          http://jenkins-ci.org/commit/remoting/a64247f30abd2f54fa6fbd89dcfe53cb43e81964
          Log:
          Merge pull request #237 from oleg-nenashev/bug/Channel_createdAt_nullChecks

          JENKINS-37566 - Cleanup issues in Command#createdAt handling

          Compare: https://github.com/jenkinsci/remoting/compare/e434854ad28c...a64247f30abd

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/Command.java src/main/java/hudson/remoting/PipeWindow.java src/main/java/hudson/remoting/ProxyOutputStream.java src/main/java/hudson/remoting/ProxyWriter.java src/main/java/hudson/remoting/Request.java src/main/java/hudson/remoting/UnexportCommand.java http://jenkins-ci.org/commit/remoting/a64247f30abd2f54fa6fbd89dcfe53cb43e81964 Log: Merge pull request #237 from oleg-nenashev/bug/Channel_createdAt_nullChecks JENKINS-37566 - Cleanup issues in Command#createdAt handling Compare: https://github.com/jenkinsci/remoting/compare/e434854ad28c...a64247f30abd

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/remoting/nio/NioChannelHub.java
          http://jenkins-ci.org/commit/remoting/c186279ee8a671c09afb322d2f75ec9166e64fa3
          Log:
          JENKINS-37566 - Suppress issue with non-serializable inner classes in NioChannelHub (#231)

          • JENKINS-37566 - Supress issue with non-serializable inner classes in NioChannelHub.

          The wrapper may decrease the performance a bit, but NioChannelHub is not being used in JNLP4 anyway.
          Ideally submissions should not use the selector tasks queue in such lame way, but it’s risky to change it to another executor service.

          • JENKINS-37566 Do not even try to serialize CallableRemotingWrapper as @stephenc suggests

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/remoting/nio/NioChannelHub.java http://jenkins-ci.org/commit/remoting/c186279ee8a671c09afb322d2f75ec9166e64fa3 Log: JENKINS-37566 - Suppress issue with non-serializable inner classes in NioChannelHub (#231) JENKINS-37566 - Supress issue with non-serializable inner classes in NioChannelHub. The wrapper may decrease the performance a bit, but NioChannelHub is not being used in JNLP4 anyway. Ideally submissions should not use the selector tasks queue in such lame way, but it’s risky to change it to another executor service. JENKINS-37566 - Address comments from @stephenc and @rysteboe JENKINS-37566 Do not even try to serialize CallableRemotingWrapper as @stephenc suggests

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          http://jenkins-ci.org/commit/remoting/b50a7812a6f774b76d13020e1e1ef63062aae1bd
          Log:
          JENKINS-37566 - FindBugs: Prevent the unconditional wait warning in Channel#waitForProperty()

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java http://jenkins-ci.org/commit/remoting/b50a7812a6f774b76d13020e1e1ef63062aae1bd Log: JENKINS-37566 - FindBugs: Prevent the unconditional wait warning in Channel#waitForProperty()

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/remoting/Channel.java
          http://jenkins-ci.org/commit/remoting/bbf5408f3d2e9d509a362fa4b75fd6a53c5a2495
          Log:
          Merge pull request #239 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-uncond-wait-ch-property

          JENKINS-37566 - FindBugs: Prevent the unconditional wait warning in Channel#waitForProperty()

          Compare: https://github.com/jenkinsci/remoting/compare/99fec6ac3c12...bbf5408f3d2e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java http://jenkins-ci.org/commit/remoting/bbf5408f3d2e9d509a362fa4b75fd6a53c5a2495 Log: Merge pull request #239 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -uncond-wait-ch-property JENKINS-37566 - FindBugs: Prevent the unconditional wait warning in Channel#waitForProperty() Compare: https://github.com/jenkinsci/remoting/compare/99fec6ac3c12...bbf5408f3d2e

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java
          http://jenkins-ci.org/commit/remoting/49b32e240e9796a1454a42a4c25ddd876fe48fb4
          Log:
          JENKINS-37566 - Cleanup FindBugs issues in WorkDirManager.

          Both are not really important, it should just make the FindBugs report clean once other pending changes are integrated.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java http://jenkins-ci.org/commit/remoting/49b32e240e9796a1454a42a4c25ddd876fe48fb4 Log: JENKINS-37566 - Cleanup FindBugs issues in WorkDirManager. Both are not really important, it should just make the FindBugs report clean once other pending changes are integrated.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java
          http://jenkins-ci.org/commit/remoting/cdec8f8aa6d52322bf6948f40c4cf82ddcf30dc1
          Log:
          Merge pull request #241 from oleg-nenashev/findbugs-cleanup/JENKINS-37566-workDirManager

          JENKINS-37566 - Cleanup FindBugs issues in WorkDirManager.

          Compare: https://github.com/jenkinsci/remoting/compare/10b525298e2a...cdec8f8aa6d5

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/remoting/engine/WorkDirManager.java http://jenkins-ci.org/commit/remoting/cdec8f8aa6d52322bf6948f40c4cf82ddcf30dc1 Log: Merge pull request #241 from oleg-nenashev/findbugs-cleanup/ JENKINS-37566 -workDirManager JENKINS-37566 - Cleanup FindBugs issues in WorkDirManager. Compare: https://github.com/jenkinsci/remoting/compare/10b525298e2a...cdec8f8aa6d5

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          Jenkinsfile
          pom.xml
          http://jenkins-ci.org/commit/remoting/6c4624e3a40d437eed325a2d824c7b92fe5d2b81
          Log:
          [FIXED JENKINS-37566] - Enforce FindBugs by default and add it to Jenkinsfile (#242)

          • [FIXED JENKINS-37566] - Enforce FindBugs by default and add it to Jenkinsfile

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile pom.xml http://jenkins-ci.org/commit/remoting/6c4624e3a40d437eed325a2d824c7b92fe5d2b81 Log: [FIXED JENKINS-37566] - Enforce FindBugs by default and add it to Jenkinsfile (#242) [FIXED JENKINS-37566] - Enforce FindBugs by default and add it to Jenkinsfile JENKINS-37566 - Fix the FindBugs definition

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/Launcher.java
          core/src/main/java/hudson/model/Computer.java
          core/src/main/java/hudson/slaves/ChannelPinger.java
          core/src/main/java/hudson/slaves/SlaveComputer.java
          core/src/main/java/jenkins/FilePathFilter.java
          core/src/main/java/jenkins/slaves/StandardOutputSwapper.java
          pom.xml
          test/src/test/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java
          test/src/test/java/jenkins/security/Security218CliTest.java
          http://jenkins-ci.org/commit/jenkins/cb3990a4d6094260bea4571e7079fd0e3949047f
          Log:
          Update to Remoting 3.15 and Cleanup issues in Channel#current() usages (#3145)

          Pulls in fixes for: JENKINS-48133, JENKINS-48055, JENKINS-37566, JENKINS-48309, JENKINS-47965, JENKINS-48130, JENKINS-37670, JENKINS-37566, JENKINS-46724

          This change also adds some missing null/closing channel checks in the core.
          In some cases the change prevents spawning threads if the channel is in the invalid state.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/slaves/ChannelPinger.java core/src/main/java/hudson/slaves/SlaveComputer.java core/src/main/java/jenkins/FilePathFilter.java core/src/main/java/jenkins/slaves/StandardOutputSwapper.java pom.xml test/src/test/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java test/src/test/java/jenkins/security/Security218CliTest.java http://jenkins-ci.org/commit/jenkins/cb3990a4d6094260bea4571e7079fd0e3949047f Log: Update to Remoting 3.15 and Cleanup issues in Channel#current() usages (#3145) Pulls in fixes for: JENKINS-48133 , JENKINS-48055 , JENKINS-37566 , JENKINS-48309 , JENKINS-47965 , JENKINS-48130 , JENKINS-37670 , JENKINS-37566 , JENKINS-46724 This change also adds some missing null/closing channel checks in the core. In some cases the change prevents spawning threads if the channel is in the invalid state.

          Oleg Nenashev added a comment -

          The change has been released in Remoting 3.15 and integrated towards Jenkins 2.98

          Oleg Nenashev added a comment - The change has been released in Remoting 3.15 and integrated towards Jenkins 2.98

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: