private boolean resolveBooleanArg(String arg, boolean defaultValue) {
    if (arg == null) return defaultValue;

    try {
      return Boolean.parseBoolean(arg);
    } catch (Exception e) {
      return defaultValue;
    }
  }
Beispiel #2
0
  /** @return <code>true</code> if template caching is enabled. */
  private boolean isCaching() {
    /*
     * Global override takes precedence.
     */
    final String global = System.getProperty(TEMPLATE_CACHING_PROPERTY);
    if (global != null) {
      return Boolean.parseBoolean(global);
    }

    return templateCaching;
  }