From f0a593fbb7011269a9563a6bfbf3005100b56035 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Tue, 5 Aug 2014 12:16:30 -0700 Subject: [PATCH] Fixed compiler warnings. Change-Id: I271db5f3e4f64f13e260e66d1ea103eedfbdde4d --- .../eclipse/cdt/core/parser/ParseError.java | 8 +++--- .../ui/text/correction/ProblemLocation.java | 26 ++----------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ParseError.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ParseError.java index dc56f5e7461..06820cfc177 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ParseError.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ParseError.java @@ -37,9 +37,11 @@ public class ParseError extends Error { TIMEOUT_OR_CANCELLED, /** - * The user preference for {@link CCorePreferenceConstants#SCALABILITY_LIMIT_TOKENS_PER_TU} is enabled - * and more than {@link CCorePreferenceConstants#SCALABILITY_MAXIMUM_TOKENS} tokens were created while - * parsing a single translation unit. + * The user preference for + * {@link org.eclipse.cdt.core.CCorePreferenceConstants#SCALABILITY_LIMIT_TOKENS_PER_TU} is + * enabled and more than + * {@link org.eclipse.cdt.core.CCorePreferenceConstants#SCALABILITY_MAXIMUM_TOKENS} tokens + * were created while parsing a single translation unit. * @since 5.7 */ TOO_MANY_TOKENS diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java index d0c261bd6a3..2f467956162 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -57,50 +57,31 @@ public class ProblemLocation implements IProblemLocation { ((IPersistableProblem) problem).getMarkerType() : ICModelMarker.C_MODEL_PROBLEM_MARKER; } - - /* (non-Javadoc) - * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getProblemId() - */ @Override public int getProblemId() { return fId; } - /* (non-Javadoc) - * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getProblemArguments() - */ @Override public String[] getProblemArguments() { return fArguments; } - /* (non-Javadoc) - * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getLength() - */ @Override public int getLength() { return fLength; } - /* (non-Javadoc) - * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getOffset() - */ @Override public int getOffset() { return fOffset; } - /* (non-Javadoc) - * @see org.eclipse.jdt.ui.text.java.IProblemLocation#isError() - */ @Override public boolean isError() { return fIsError; } - /* (non-Javadoc) - * @see org.eclipse.jdt.ui.text.java.IProblemLocation#getMarkerType() - */ @Override public String getMarkerType() { return fMarkerType; @@ -122,16 +103,13 @@ public class ProblemLocation implements IProblemLocation { } private String getErrorCode(int code) { - StringBuffer buf= new StringBuffer(); + StringBuilder buf= new StringBuilder(); if ((code & IProblem.SCANNER_RELATED) != 0) { buf.append("ScannerRelated + "); //$NON-NLS-1$ } if ((code & IProblem.PREPROCESSOR_RELATED) != 0) { buf.append("PreprocessorRelated + "); //$NON-NLS-1$ } - if ((code & IProblem.SEMANTICS_RELATED) != 0) { - buf.append("SemanticsRelated + "); //$NON-NLS-1$ - } if ((code & IProblem.INTERNAL_RELATED) != 0) { buf.append("Internal + "); //$NON-NLS-1$ }