code: public static short toShort(final String str, final short defaultValue) {
          if(str == null) {
              return defaultValue;
          }
          try {
              return Short.parseShort(str);
          } catch (final NumberFormatException nfe) {
              return defaultValue;
          }
      }
docs: <p>Convert a <code>String</code> to an <code>short</code>, returning a
  default value if the conversion fails.</p>
  
  <p>If the string is <code>null</code>, the default value is returned.</p>
  
  <pre>
  NumberUtils.toShort(null, 1) = 1
  NumberUtils.toShort("", 1)   = 1
  NumberUtils.toShort("1", 0)  = 1
  </pre>
  
  @param str  the string to convert, may be null
  @param defaultValue  the default value
  @return the short represented by the string, or the default if conversion fails
  @since 2.5