changeset 434:90b8b2c8934b

Yak shaving: better identing in generated source.
author shade
date Fri, 28 Feb 2014 02:57:25 +0400
parents 820cca158d4b
children 415fc7ca4340
files jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Fri Feb 28 02:51:25 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Fri Feb 28 02:57:25 2014 +0400
@@ -419,21 +419,21 @@
             result.add(so.type + " tryInit_" + so.fieldIdentifier + "(InfraControl control, " + so.type + " val) throws Throwable {");
             result.add("    if (" + so.fieldIdentifier + " == null) {");
             if (!so.getParamsLabels().isEmpty()) {
-                result.add("            Field f;");
-                result.add("            Class c = " + so.userType + ".class;");
+                result.add("        Field f;");
+                result.add("        Class c = " + so.userType + ".class;");
             }
             for (String paramName : so.getParamsLabels()) {
-                result.add("            f = c.getDeclaredField(\"" + paramName + "\");");
-                result.add("            f.setAccessible(true);");
-                result.add("            f.set(val, " + so.getParamAccessor(paramName) + ");");
+                result.add("        f = c.getDeclaredField(\"" + paramName + "\");");
+                result.add("        f.setAccessible(true);");
+                result.add("        f.set(val, " + so.getParamAccessor(paramName) + ");");
             }
             for (HelperMethodInvocation hmi : helpersByState.get(so)) {
                 if (hmi.helperLevel != Level.Trial) continue;
                 if (hmi.type != HelperType.SETUP) continue;
-                result.add("                val." + hmi.method.getName() + "();");
+                result.add("        val." + hmi.method.getName() + "();");
             }
-            result.add("                " + "val.ready" + Level.Trial + " = true;");
-            result.add("          " + so.fieldIdentifier + " = val;");
+            result.add("        " + "val.ready" + Level.Trial + " = true;");
+            result.add("        " + so.fieldIdentifier + " = val;");
             result.add("    }");
             result.add("    return " + so.fieldIdentifier + ";");
             result.add("}");