From 1e1afcf3ce7a963ba0ee54c9d71928009d1243cf Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 7 Apr 2014 17:10:27 -0700 Subject: [PATCH] Cosmetics. --- .../dom/parser/cpp/CPPUnaryTypeTransformation.java | 4 ++-- .../PDOMCPPClassTemplatePartialSpecialization.java | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java index 9e4287d96bf..d0c478380a2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java @@ -19,7 +19,6 @@ import org.eclipse.core.runtime.CoreException; /** * Implementation of ICPPUnaryTypeTransformation. - * */ public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation, ISerializableType { Operator fOperator; @@ -65,9 +64,10 @@ public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation, public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int operator = buffer.getByte(); - if (operator >= Operator.values().length) + if (operator >= Operator.values().length) { throw new CoreException(CCorePlugin.createStatus( "Cannot unmarshal CPPUnaryTypeTransformation - unrecognized type transformation operator")); //$NON-NLS-1$ + } return new CPPUnaryTypeTransformation(Operator.values()[operator], buffer.unmarshalType()); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java index 1536bd33893..6a7649d960f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassTemplatePartialSpecialization.java @@ -62,8 +62,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate linkage.new ConfigurePartialSpecialization(this, partial); } - public PDOMCPPClassTemplatePartialSpecialization(PDOMLinkage linkage, - long bindingRecord) { + public PDOMCPPClassTemplatePartialSpecialization(PDOMLinkage linkage, long bindingRecord) { super(linkage, bindingRecord); } @@ -133,15 +132,15 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate @Override public int pdomCompareTo(PDOMBinding other) { int cmp = super.pdomCompareTo(other); - if(cmp == 0) { - if(other instanceof PDOMCPPClassTemplatePartialSpecialization) { + if (cmp == 0) { + if (other instanceof PDOMCPPClassTemplatePartialSpecialization) { try { PDOMCPPClassTemplatePartialSpecialization otherSpec = (PDOMCPPClassTemplatePartialSpecialization) other; int mySM = getSignatureHash(); int otherSM = otherSpec.getSignatureHash(); return mySM == otherSM ? 0 : mySM < otherSM ? -1 : 1; - } catch(CoreException ce) { - CCorePlugin.log(ce); + } catch (CoreException e) { + CCorePlugin.log(e); } } else { assert false;