Details
-
Bug
-
Status: Patch Available
-
Trivial
-
Resolution: Unresolved
-
2.1.0
-
None
Description
return getClass().getSimpleName().substring(10).toLowerCase();
causes
java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1875) at org.apache.hadoop.hive.ql.udf.generic.GenericUDF.getFuncName(GenericUDF.java:258)
if the Classname of my UDF is less than 10 characters.
this was probably to remove "GenericUDF" from the classname but causes issues if the class doesn't start with it.