code: public static String setProperty(String value, String defValue) {
          if (value != null && !"".equals(value)) {
              return value;
          }
          return defValue;
      }
docs: Set value to a variable (null is forbiden, so set default value).
  
  @param value
  is value setted if value is not null.
  @param defValue
  is value setted if value is null.
  @return a {link java.lang.String} with the value not null.