From 7f875fc6044ca2b9bd56668b8c6ec65b82897fe8 Mon Sep 17 00:00:00 2001 From: aclement Date: Sat, 27 Sep 2008 17:32:47 +0000 Subject: 248814: perclassloaderdumpdir --- .../src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 2 +- loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 10eaefbab..9bc3dd650 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -735,7 +735,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { protected String getDumpDir() { if (dumpDirPerClassloader) { StringBuffer dir = new StringBuffer(); - dir.append("_ajdump").append(File.separator).append(weavingContext.getClassLoaderName()); + dir.append("_ajdump").append(File.separator).append(weavingContext.getId()); return dir.toString(); } else { return super.getDumpDir(); diff --git a/loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java b/loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java index 6d1a878e4..19feeb393 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/DefaultWeavingContext.java @@ -84,7 +84,9 @@ public class DefaultWeavingContext implements IWeavingContext { if (shortName == null) { shortName = getClassLoaderName().replace('$','.'); int index = shortName.lastIndexOf("."); - shortName = shortName.substring(index + 1); + if (index!=-1) { + shortName = shortName.substring(index + 1); + } } return shortName; } -- cgit v1.2.3