Jump to content

Java.lang.String.isEmpty

From EggeWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

I was getting the following error when I deployed a component into a JBoss container. <geshi> java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z </geshi>

Initially, I thought it was an issue with the classloader. Turns out, I was using a new Java 1.6 feature.

<geshi lang="java5">

   /**
    * Returns true if, and only if, {@link #length()} is 0.
    *
    * @return true if {@link #length()} is 0, otherwise
    * false
    *
    * @since 1.6
    */
   public boolean isEmpty() {

return count == 0;

   }

</geshi>