Warnings to be fixed - memory acess

Bug #1762817 reported by Jiri Srba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Released
Low
Kenneth Yrke Jørgensen

Bug Description

When running on Mac with Java 9 I get the following warnings that should be fixed:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by dk.aau.cs.util.MemoryMonitor (file:/Users/srba/dev/tapaal-fix-1756865/release-version/) to field java.lang.ProcessImpl.pid
WARNING: Please consider reporting this to the maintainers of dk.aau.cs.util.MemoryMonitor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Related branches

Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

It seems like this might be an unsupported hack: "For example on Macs, it returns java.lang.UnixProcess which has a private field called pid. Using Reflection you can easily get the value of this field. This is admittedly a hack, but it might help. What do you need the PID for anyway?" https://stackoverflow.com/questions/4750470/how-to-get-pid-of-process-ive-just-started-within-java-program/5578924

We need to find a supported way of getting the process PID, but until then I guess I would be safe to ignore the warning.

Changed in tapaal:
status: New → Confirmed
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

Since Java 9 class Process has new method long pid(). However, this requires that we update the language version to 11, which should be ok, as 1.8 is soon EOL.

Changed in tapaal:
importance: Critical → Low
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

Java version is updated to 11, so we replaced the existing implementation with net pid() method

Changed in tapaal:
assignee: nobody → Kenneth Yrke Jørgensen (yrke)
status: Confirmed → In Progress
Jiri Srba (srba)
Changed in tapaal:
status: In Progress → Fix Committed
Jiri Srba (srba)
Changed in tapaal:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.