*** specs/j2ee-jacc/src/java/javax/security/jacc/EJBMethodPermission.java.orig 2006-03-07 18:15:13.000000000 -0500 --- specs/j2ee-jacc/src/java/javax/security/jacc/EJBMethodPermission.java 2006-03-07 18:20:53.000000000 -0500 *************** *** 200,205 **** --- 200,225 ---- initActions(); } + private static String getTypeName(Class klass) { + String className = klass.getName(); + + if (! klass.isArray()) + // not an Array, so we have the proper name + return className; + else { + // For an Array we need to find out its dimensions + int dimentions = className.indexOf('L'); + // Clean up class name + className = className.substring(dimentions + 1, className.length() - 1); + // Create a display name with the required format + StringBuffer b = new StringBuffer(className.length() + 2 * dimentions); + b.append(className); + for (int i = 0; i < dimentions; ++i) + b.append("[]"); + return b.toString(); + } + } + public MethodSpec(String mthdInterface, Method method) { checkMethodInterface(mthdInterface); *************** *** 210,219 **** if (paramTypes.length == 0) { methodParams = ""; } else { ! StringBuffer buffer = new StringBuffer(paramTypes[0].getName()); ! for (int i = 1; i < paramTypes.length; i++) { buffer.append(","); ! buffer.append(paramTypes[i].getName()); } methodParams = buffer.toString(); } --- 230,238 ---- if (paramTypes.length == 0) { methodParams = ""; } else { ! StringBuffer buffer = new StringBuffer(getTypeName(paramTypes[0])); for (int i = 1; i < paramTypes.length; i++) { buffer.append(","); ! buffer.append(getTypeName(paramTypes[i])); } methodParams = buffer.toString(); }