These inlined interface method calls are only visible if you have the interface type checked in the code. This can be done using either a @Intf annotation or by adding the interface type to the checked-list of the project.

This issue has been fixed in Eclipse Openj9 version 0.36.0. In Eclipse Openj9 version 0.36.0, the bytecode of inlined interface method calls is checked to ensure that the call is compatible with the interface type. If the call is not compatible, the call will be rejected at bytecode level. Intrinsic method calls such as those in the Thread class are not checked for compatibility.

How to detect if your project is affected?

To detect if your project is affected, follow these steps:
1. Ensure that the interface type is checked in the project settings. If it is not checked, then the call will be rejected by Eclipse Openj9.
2. In the file where you have code that contains an inlined interface method call, search for a class with a Java exception of type "java/lang/InternalError", "java/lang/IllegalArgumentException", or "java/lang/IllegalAccessException".
3. Make sure your project's version number matches Eclipse Openj9 0.36.0+
4. If you still have problems detecting the issue, please contact us at support@eclipseopenj9.com

What is a Bytecode Check?

A Bytecode Check is a form of analysis that can be performed at the bytecode level to check for potential issues.
When you use an annotation such as @Intf or checked-list types, a Bytecode Check is automatically run on the code. If the Bytecode Check finds an issue, your issue will be marked as resolved.
For example, if you were using annotations such as @Intf and checked-list types, your code would be analyzed for compatibility at compile time. If the code was incompatible with the interface type, the build would fail with an error.

How to identify inlined interface method calls?

To identify when inlined interface method calls are being made, you can use the ClassFileMerger tool.
The tool is a plugin for Eclipse and will automatically run when you open your code in Eclipse.
When a call to an interface method is encountered, the tool will print out the call site as well as the Java code that generated the call.

Timeline

Published on: 10/24/2022 14:15:00 UTC
Last modified on: 10/25/2022 14:28:00 UTC

References