Cleanup (minor optimization)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user