From 298bf22f80883b0afd405e81d598fdb585b7d646 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 26 May 2014 17:02:47 +0400 Subject: [PATCH] Cleanup (formatting) --- .../psi/impl/compiled/StubBuildingVisitor.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java index 3428a8eee0fe..7dcb272becf8 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java @@ -431,19 +431,17 @@ public class StubBuildingVisitor extends ClassVisitor { final PsiModifierListStub modList = new PsiModifierListStubImpl(stub, packMethodFlags(access, myResult.isInterface())); + String returnType = null; boolean parsedViaGenericSignature = false; - String returnType; - if (signature == null) { - returnType = parseMethodViaDescription(desc, stub, args); - } - else { + if (signature != null) { try { returnType = parseMethodViaGenericSignature(signature, stub, args, throwables); parsedViaGenericSignature = true; } - catch (ClsFormatException e) { - returnType = parseMethodViaDescription(desc, stub, args); - } + catch (ClsFormatException ignored) { } + } + if (returnType == null) { + returnType = parseMethodViaDescription(desc, stub, args); } stub.setReturnType(TypeInfo.fromString(returnType)); @@ -511,8 +509,7 @@ public class StubBuildingVisitor extends ClassVisitor { private static String parseMethodViaGenericSignature(final String signature, final PsiMethodStubImpl stub, final List args, - final List throwables) - throws ClsFormatException { + final List throwables) throws ClsFormatException { StringCharacterIterator iterator = new StringCharacterIterator(signature); SignatureParsing.parseTypeParametersDeclaration(iterator, stub);