Patch from Charlie Groves:

mdb's changes to GenUtil yesterday are causing it to choke when making type
  names for arrays and causing genservice to blow up in yohoho.  This checks
  for the subclass of Type for arrays and properly generates a name for it.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2341 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2008-07-23 18:59:11 +00:00
parent 05357b597d
commit e67458d55f
+3 -1
View File
@@ -45,7 +45,9 @@ public class GenUtil
*/
public static String simpleName (Type type)
{
if (type instanceof Class) {
if (type instanceof GenericArrayType) {
return simpleName(((GenericArrayType)type).getGenericComponentType()) + "[]";
} else if (type instanceof Class) {
Class clazz = (Class)type;
if (clazz.isArray()) {
return simpleName(clazz.getComponentType()) + "[]";