Changeset 2151 for FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java
- Timestamp:
- 2008-07-03 00:03:15 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java
r2101 r2151 23 23 import java.util.HashMap; 24 24 import java.util.Map; 25 26 import net.fckeditor.tool.Utils; 25 27 26 28 /** … … 85 87 * represented by the string argument. 86 88 * @throws IllegalArgumentException 87 * If 'name' is null can't be parsed.89 * If 'name' is <code>null</code>, empty, or does not exist. 88 90 */ 89 91 public static ResourceTypeHandler valueOf(final String name) throws IllegalArgumentException { 90 if ( name == null)92 if (Utils.isEmpty(name)) 91 93 throw new IllegalArgumentException(); 92 94 … … 110 112 } 111 113 114 /** 115 * Tries to determine ResourceType from string and return {@link #FILE} if 116 * provided string is invalid. 117 * 118 * @param name 119 * @return resource type 120 */ 112 121 public static ResourceTypeHandler getDefaultResourceType(final String name) { 113 122 ResourceTypeHandler rt = getResourceType(name);