Getting the server name on Liberty

This rule flags references to the following methods:

These methods are not available on Liberty.

This rule has an automated fix. Copy the custom configuration to your application build file to enable the fix automation.

The binary scanner will have an automated fix to change any reference to the methods mentioned earlier to java.lang.System.getProperty("wlp.server.name") which retrieves the name of your Liberty server. This solution does not work on WebSphere Application Server traditional.

For alternative solutions, see the Programmatic access to location properties section in the documentation.