changeset 388:4495c91bdaf4

Fixing the trailing underscore in generated class names.
author shade
date Tue, 11 Feb 2014 22:54:59 +0400
parents a5dc4bed3735
children 8a73dfe4bd9e
files jmh-core/src/main/java/org/openjdk/jmh/processor/internal/AnnUtils.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/AnnUtils.java	Tue Feb 11 20:05:51 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/processor/internal/AnnUtils.java	Tue Feb 11 22:54:59 2014 +0400
@@ -70,7 +70,7 @@
         String name = "";
         Element walk = clazz;
         while (walk.getKind() != ElementKind.PACKAGE) {
-            name = walk.getSimpleName().toString() + "_" + name;
+            name = walk.getSimpleName().toString() + (name.isEmpty() ? "" : "_" + name);
             walk = walk.getEnclosingElement();
         }
         return name.substring(0, name.length());