[ 
https://issues.apache.org/jira/browse/NIFI-5820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689614#comment-16689614
 ] 

ASF GitHub Bot commented on NIFI-5820:
--------------------------------------

Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/3174
  
    Thanks for taking a look at the PR, @joewitt.  That warning is due to 
accessing, via reflection, the `pid` method on the Process API, which was added 
in Java 9.  The code that does this was added by NIFI-5175, to allow NiFI built 
on Java 1.8 to run on Java 9.  There's a comment in the code detailing why the 
use of reflection is necessary.  Please see 
https://github.com/apache/nifi/blob/master/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/util/OSUtils.java#L111.
    
    The warning is expected, and when we have a minimum requirement of Java 11, 
we can refactor OSUtils, or probably remove the class entirely, since the 
Process API (as of Java 9) provides a platform independent way to get a PID.  I 
don't think we'll need to have the methods in OSUtils for getting the PID based 
on which platform on which NiFi is running.


> NiFi built with Java 1.8 needs to run on Java 11
> ------------------------------------------------
>
>                 Key: NIFI-5820
>                 URL: https://issues.apache.org/jira/browse/NIFI-5820
>             Project: Apache NiFi
>          Issue Type: Sub-task
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to