Closed Adelrisk closed 1 year ago
hi, thank you for report. pay attention that ClosedWatchServiceException is fantom class and not a part RoboVM RT. that's what makes soot not happy. Beside bug in soot app itself will be crashing (with ClassNotFound) when trying to access this class
This class is part of the java SDK. https://docs.oracle.com/javase/8/docs/api/java/nio/file/ClosedWatchServiceException.html
What might we have done to make it shadowed?
Edit: the wheels are turning. Checking the installation on iOS.
This class is part of the java SDK. https://docs.oracle.com/javase/8/docs/api/java/nio/file/ClosedWatchServiceException.html
What might we have done to make it shadowed?
By design, RoboVM RT is Android 4.0 based (API 14) and does not include this class and many others. (Aside note: it seems to have been introduced to Android in API 26.)
Issue details
My build with robovm fails due to a multi-catch when one of the exceptions is shadowed (in this case,
java.nio.file.ClosedWatchServiceException
). The following block fails:https://github.com/ecsec/open-ecard/blob/36ae6a497b5668a2c9fe58c9761be53f91d68c08/addon/src/main/java/org/openecard/addon/AddonFileSystemMonitor.java#L153
I found this issue https://github.com/Sable/soot/issues/167 and was inspired the following workaround. I can fix it by breaking the multi-cast up, so the shadowed class is in a separate catch block.
Reproduction steps/code
Configuration
Build Tools:
Versions:
Build Targets:
Stacktrace
The above process fails with the following statements.
Edit: change code link to be a permalink. Edit: More exact jdk version.