Mercurial > hg > graal-compiler
changeset 7820:8959b331ef3e
corrected class file retrieval
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Tue, 19 Feb 2013 16:03:11 +0100 |
parents | aa022eaf1569 |
children | b96083fb7449 268d3e74191e |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Tue Feb 19 11:21:03 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Tue Feb 19 16:03:11 2013 +0100 @@ -502,12 +502,12 @@ @Override public String getClassFilePath() { Class<?> cls = mirror(); - String classFileName = MetaUtil.getSimpleName(cls, false); - while (cls.isLocalClass() || cls.isMemberClass()) { - cls = cls.getEnclosingClass(); - classFileName = new StringBuilder(MetaUtil.getSimpleName(cls, false)).append('$').append(classFileName).toString(); + String name = cls.getName(); + int dot = name.lastIndexOf('.'); + if (dot != -1) { + name = name.substring(dot + 1); } - URL classFilePath = cls.getResource(classFileName + ".class"); + URL classFilePath = cls.getResource(name + ".class"); return classFilePath == null ? null : classFilePath.getPath(); } }