All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeaninternal.server.profile.UtilLocation Maven / Gradle / Ivy

There is a newer version: 15.10.0
Show newest version
package io.ebeaninternal.server.profile;

final class UtilLocation {

  static String label(String shortDescription) {
    int pos = shortDescription.indexOf("(");
    if (pos == -1) {
      return shortDescription;
    } else {
      return trimInit(shortDescription.substring(0, pos));
    }
  }

  /**
   * Trim constructor init to be "safe" without greater than or less than chars.
   */
  private static String trimInit(String desc) {
    if (desc.endsWith("")) {
      // trim to make a safe label
      return desc.substring(0, desc.length() - 6) + "init";
    }
    return desc;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy