TypeName.fetchFromInternalName(): fixed a bug occuring when parsing class name without a package.

This commit is contained in:
Ryszard Wiśniewski 2010-06-01 13:30:09 +02:00
parent 0aa2015fda
commit f07aae158a

View File

@ -182,8 +182,13 @@ public class TypeName {
internal = internal.substring(1, pos);
pos = internal.lastIndexOf('/');
package_ = internal.substring(0, pos).replace('/', '.');
type = internal.substring(pos + 1);
if (pos == -1) {
package_ = "";
type = internal;
} else {
package_ = internal.substring(0, pos).replace('/', '.');
type = internal.substring(pos + 1);
}
pos = type.indexOf('$');
if (pos != -1) {