Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52070

remove reflection and support Windows in lib-process-utils for getting PID

    Details

    • Similar Issues:

      Description

      The ProcessUtils in lib-process-utils allows getting PID from a process using reflection. As part of the general Java 9/10/11 hackathon all setAccessible reflection use was being reviewed.

       

      This issue is to remove the reflection use, and as a nice side effect the code will work on Windows too. However, this requires upgrading to Java 9+, so I don't really expect it to happen anytime soon. For now I wanted to preserve the little bit of work I did.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It seems the current code is not going to work on Java 9+, right?

          Show
          oleg_nenashev Oleg Nenashev added a comment - It seems the current code is not going to work on Java 9+, right?
          Hide
          jonahgraham Jonah Graham added a comment -

          It works in Java9+ so far, just gives the standard warning:

          WARNING: Illegal reflective access by org.jenkinsci.utils.process.ProcessUtils (file:/scratch/jenkins/git/lib-process-utils/target/classes/) to field java.lang.ProcessImpl.pid

           

           

          Show
          jonahgraham Jonah Graham added a comment - It works in Java9+ so far, just gives the standard warning: WARNING: Illegal reflective access by org.jenkinsci.utils.process.ProcessUtils ( file:/scratch/jenkins/git/lib-process-utils/target/classes/ ) to field java.lang.ProcessImpl.pid    
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Maven Compile r3.8.0 supports Multi-release JARs, so maybe we need another PR

          Show
          oleg_nenashev Oleg Nenashev added a comment - Maven Compile r3.8.0 supports Multi-release JARs, so maybe we need another PR

            People

            • Assignee:
              jonahgraham Jonah Graham
              Reporter:
              jonahgraham Jonah Graham
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: