File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
log4j-api/src/main/java/org/apache/logging/log4j/util/internal Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -163,8 +163,7 @@ public static String stripArray(final Class<?> clazz) {
163163 * @see Class#getName()
164164 */
165165 public static String stripArray (final String name ) {
166- int offset ;
167- for (offset = 0 ; offset < name .length () && name .charAt (offset ) == '[' ; offset ++) {}
166+ final int offset = name .lastIndexOf ('[' ) + 1 ;
168167 if (offset == 0 ) {
169168 return name ;
170169 }
@@ -191,8 +190,7 @@ public static String stripArray(final String name) {
191190 case "S" :
192191 return "short" ;
193192 default :
194- // Should never happen
195- return name ;
193+ throw new IllegalArgumentException ("Unsupported array class signature '" + name + "'" );
196194 }
197195 }
198196
You can’t perform that action at this time.
0 commit comments