Cleanup (formatting; typos)

This commit is contained in:
Roman Shevchenko
2017-12-04 14:44:19 +01:00
parent 149d7ee681
commit 93429bc8a5
2 changed files with 10 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants;
@@ -422,9 +424,9 @@ public class ClassWriter {
}
if (initializer != null) {
if (isEnum && initializer.type == Exprent.EXPRENT_NEW) {
NewExprent nexpr = (NewExprent)initializer;
nexpr.setEnumConst(true);
buffer.append(nexpr.toJava(indent, tracer));
NewExprent expr = (NewExprent)initializer;
expr.setEnumConst(true);
buffer.append(expr.toJava(indent, tracer));
}
else {
buffer.append(" = ");
@@ -433,7 +435,7 @@ public class ClassWriter {
((ConstExprent) initializer).adjustConstType(fieldType);
}
// FIXME: special case field initializer. Can map to more than one method (constructor) and bytecode intruction.
// FIXME: special case field initializer. Can map to more than one method (constructor) and bytecode instruction
buffer.append(initializer.toJava(indent, tracer));
}
}

View File

@@ -1,4 +1,6 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.CodeConstants;
@@ -675,7 +677,6 @@ public class ExprProcessor implements CodeConstants {
}
public static String getTypeName(VarType type, boolean getShort) {
int tp = type.type;
if (tp <= CodeConstants.TYPE_BOOLEAN) {
return typeNames[tp];