From 9d5a863e4d63b62c8041d034b23b7425e5cec620 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 30 May 2016 16:30:00 +0300 Subject: [PATCH] Cleanup (minor optimization) --- .../modules/decompiler/exps/ExitExprent.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java index 7b4a5ac..c6b962c 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import org.jetbrains.java.decompiler.struct.attr.StructExceptionsAttribute; import org.jetbrains.java.decompiler.struct.gen.VarType; import org.jetbrains.java.decompiler.struct.match.MatchEngine; import org.jetbrains.java.decompiler.struct.match.MatchNode; -import org.jetbrains.java.decompiler.struct.match.IMatchable.MatchProperties; import org.jetbrains.java.decompiler.util.InterpreterUtil; import java.util.ArrayList; @@ -83,14 +82,14 @@ public class ExitExprent extends Exprent { tracer.addMapping(bytecode); if (exitType == EXIT_RETURN) { - TextBuffer buffer = new TextBuffer(); + TextBuffer buffer = new TextBuffer("return"); if (retType.type != CodeConstants.TYPE_VOID) { - buffer.append(" "); + buffer.append(' '); ExprProcessor.getCastedExprent(value, retType, buffer, indent, false, tracer); } - return buffer.prepend("return"); + return buffer; } else { MethodWrapper method = (MethodWrapper)DecompilerContext.getProperty(DecompilerContext.CURRENT_METHOD_WRAPPER); @@ -115,9 +114,9 @@ public class ExitExprent extends Exprent { if (classname != null) { VarType exType = new VarType(classname, true); - TextBuffer buffer = new TextBuffer(); + TextBuffer buffer = new TextBuffer("throw "); ExprProcessor.getCastedExprent(value, exType, buffer, indent, false, tracer); - return buffer.prepend("throw "); + return buffer; } } }