changeset 989:a85487efd84e

generators: generated code readability, omit the number suffix for some generated classes.
author shade
date Tue, 02 Sep 2014 15:15:15 +0400
parents 0c828f0e6001
children 239a7f170831
files jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java	Fri Aug 29 14:55:24 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java	Tue Sep 02 15:15:15 2014 +0400
@@ -42,9 +42,9 @@
     public String getJMHtype(String type) {
         String jmhType = jmhTypes.get(type);
         if (jmhType == null) {
-            int v = 1;
+            int v = 0;
             do {
-                jmhType = getBaseType(type) + "_" + v + "_jmh";
+                jmhType = getBaseType(type) + (v == 0 ? "" : "_"+ v) + "_jmh";
                 v++;
             } while (!claimedJmhTypes.add(jmhType));
             jmhTypes.put(type, jmhType);