Why Reinvent The Wheel When There Are 1500 Already
It was after expressing this frustration that Nathan Freeman pointed me in the direction of org.apache.commons.lang which contains a host of additional classes and methods for handling the core Java classes. One of these is StringUtils.substringAfter(String str, String separator), the equivalent of @Right. What’s better is that these classes are null safe, so they gracefully handle getting passed a parameter that’s null.
But the question of some developers will be whether these are supported by IBM and how to get hold of them. The answer can be found in
The alternative is to import the jar into the source folder for your custom Java code and managed beans and then add it to your build path using the Add JARs button. It will then appear under the Referenced Libraries, as in the screenshots below. Then you can take advantage of it. And there are another 1500 Java packages available in the same location (I can’t take the credit for the count, that was Nathan!). Enjoy.