mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Remove unnecessary @SuppressWarnings
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
ef53a9fa4d
commit
a04d64606e
27 changed files with 29 additions and 33 deletions
|
@ -75,7 +75,7 @@ public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHov
|
|||
List<Annotation> exact= new ArrayList<Annotation>();
|
||||
List<Annotation> including= new ArrayList<Annotation>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= model.getAnnotationIterator();
|
||||
while (e.hasNext()) {
|
||||
Object o= e.next();
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.eclipse.ui.editors.text.TextFileDocumentProvider;
|
|||
public class AutoconfDocumentProvider extends TextFileDocumentProvider {
|
||||
|
||||
public void shutdown() {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= getConnectedElementsIterator();
|
||||
while (e.hasNext())
|
||||
disconnect(e.next());
|
||||
|
|
|
@ -185,7 +185,7 @@ public class AutoconfEditor extends TextEditor implements IAutotoolsEditor, IPro
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
public Object getAdapter(Class required) {
|
||||
if (ProjectionAnnotationModel.class.equals(required)) {
|
||||
if (fProjectionSupport != null) {
|
||||
|
|
|
@ -86,7 +86,7 @@ public class AutoconfErrorHandler implements IAutoconfErrorHandler {
|
|||
|
||||
public void removeExistingMarkers(int offset, int length)
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator i = fAnnotationModel.getAnnotationIterator();
|
||||
while (i.hasNext()) {
|
||||
Annotation annotation = (Annotation)i.next();
|
||||
|
|
|
@ -45,7 +45,7 @@ public class AutoconfContentOutlinePage extends ContentOutlinePage {
|
|||
protected ISelection updateSelection(ISelection sel) {
|
||||
ArrayList<AutoconfElement> newSelection= new ArrayList<AutoconfElement>();
|
||||
if (sel instanceof IStructuredSelection) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator iter= ((IStructuredSelection)sel).iterator();
|
||||
for (;iter.hasNext();) {
|
||||
//ICElement elem= fInput.findEqualMember((ICElement)iter.next());
|
||||
|
|
|
@ -49,7 +49,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
|||
|
||||
int yoursStart= offset;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= presentation.getAllStyleRangeIterator();
|
||||
while (e.hasNext()) {
|
||||
|
||||
|
|
|
@ -404,7 +404,7 @@ public class ProjectionFileUpdater implements IProjectionListener {
|
|||
|
||||
private Map<AutoconfElement, List<AutoconfProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
|
||||
Map<AutoconfElement, List<AutoconfProjectionAnnotation>> map= new HashMap<AutoconfElement, List<AutoconfProjectionAnnotation>>();
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= model.getAnnotationIterator();
|
||||
while (e.hasNext()) {
|
||||
Object annotation= e.next();
|
||||
|
|
|
@ -97,7 +97,7 @@ public class AutomakeDocumentProvider extends TextFileDocumentProvider implement
|
|||
* @see org.eclipse.cdt.internal.autotools.ui.editors.automake.IMakefileDocumentProvider#shutdown()
|
||||
*/
|
||||
public void shutdown() {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= getConnectedElementsIterator();
|
||||
while (e.hasNext())
|
||||
disconnect(e.next());
|
||||
|
|
|
@ -103,7 +103,7 @@ public class AutomakeEditor extends MakefileEditor {
|
|||
/* (non-Javadoc)
|
||||
* Method declared on IAdaptable
|
||||
*/
|
||||
public Object getAdapter(@SuppressWarnings("unchecked") Class key) {
|
||||
public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
|
||||
if (key.equals(IContentOutlinePage.class)) {
|
||||
return getAutomakeOutlinePage();
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class MakefileAnnotationHover implements IAnnotationHover, IAnnotationHov
|
|||
List<Annotation> exact= new ArrayList<Annotation>();
|
||||
List<Annotation> including= new ArrayList<Annotation>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= model.getAnnotationIterator();
|
||||
while (e.hasNext()) {
|
||||
Object o= e.next();
|
||||
|
|
|
@ -137,7 +137,7 @@ public class MakefileDocumentProvider extends TextFileDocumentProvider implement
|
|||
* @see org.eclipse.cdt.internal.autotools.ui.editors.automake.MakefileDocumentProvider#shutdown()
|
||||
*/
|
||||
public void shutdown() {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= getConnectedElementsIterator();
|
||||
while (e.hasNext())
|
||||
disconnect(e.next());
|
||||
|
|
|
@ -166,7 +166,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
|
|||
/* (non-Javadoc)
|
||||
* Method declared on IAdaptable
|
||||
*/
|
||||
public Object getAdapter(@SuppressWarnings("unchecked") Class key) {
|
||||
public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
|
||||
if (ProjectionAnnotationModel.class.equals(key)) {
|
||||
if (projectionSupport != null) {
|
||||
Object result = projectionSupport.getAdapter(getSourceViewer(), key);
|
||||
|
|
|
@ -277,7 +277,7 @@ public class OpenIncludeAction extends Action {
|
|||
|
||||
private static IInclude getIncludeStatement(ISelection sel) {
|
||||
if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
List list= ((IStructuredSelection)sel).toList();
|
||||
if (list.size() == 1) {
|
||||
Object element= list.get(0);
|
||||
|
|
|
@ -151,7 +151,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
|
|||
if (fInput != null) {
|
||||
ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
|
||||
if (model != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Map additions= computeAdditions((IParent) fInput);
|
||||
model.removeAllAnnotations();
|
||||
model.replaceAnnotations(null, additions);
|
||||
|
@ -371,7 +371,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
|
|||
|
||||
private Map<IDirective, List<MakefileProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
|
||||
Map<IDirective, List<MakefileProjectionAnnotation>> map= new HashMap<IDirective, List<MakefileProjectionAnnotation>>();
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
Iterator e= model.getAnnotationIterator();
|
||||
while (e.hasNext()) {
|
||||
Object annotation= e.next();
|
||||
|
|
|
@ -91,7 +91,7 @@ public abstract class SelectionStatusDialog extends SelectionDialog {
|
|||
* if there isn't any initial selection.
|
||||
* @return the first element of the initial selection.
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
protected Object getPrimaryInitialSelection() {
|
||||
List result= getInitialElementSelections();
|
||||
if (result == null || result.size() == 0)
|
||||
|
|
|
@ -62,7 +62,6 @@ public class BuildGroup extends CViewActionGroup {
|
|||
super(shell, kind);
|
||||
}
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void run() {
|
||||
// Ensure we correctly save files in all referenced projects before build
|
||||
Set<IProject> prjs = new HashSet<IProject>();
|
||||
|
|
|
@ -59,7 +59,7 @@ public class DisassemblyDisplayModeHandler extends AbstractHandler implements IE
|
|||
* @see org.eclipse.ui.commands.IElementUpdater#updateElement(org.eclipse.ui.menus.UIElement, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void updateElement( UIElement element, Map parameters ) {
|
||||
IWorkbenchPartSite site = element.getServiceLocator().getService( IWorkbenchPartSite.class );
|
||||
if ( site != null ) {
|
||||
|
|
|
@ -68,7 +68,7 @@ public class SetSteppingModeHandler extends AbstractHandler implements IElementU
|
|||
* @see org.eclipse.ui.commands.IElementUpdater#updateElement(org.eclipse.ui.menus.UIElement, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void updateElement( UIElement element, Map parameters ) {
|
||||
String param = (String)parameters.get( ID_PARAMETER_MODE );
|
||||
if ( param != null ) {
|
||||
|
|
|
@ -359,7 +359,7 @@ public class DisassemblyPane implements IPropertyChangeListener {
|
|||
return EditorsUI.getSharedTextColors();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected IVerticalRuler createCompositeRuler() {
|
||||
CompositeRuler ruler = new CompositeRuler();
|
||||
ruler.addDecorator( 0, new AnnotationRulerColumn( VERTICAL_RULER_WIDTH, getAnnotationAccess() ) );
|
||||
|
|
|
@ -196,7 +196,7 @@ public class VirtualDocument extends Document {
|
|||
getAnnotationProvider().update( getContentProvider().getInput(), element, index, getPresentationContext() );
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected void updateAnnotations( int lineNumber, Annotation[] annotations ) {
|
||||
IAnnotationModel annotationModel = getAnnotationModel();
|
||||
try {
|
||||
|
|
|
@ -59,7 +59,6 @@ public class DsfTestBreakpointAttributeTranslator2 implements IBreakpointAttribu
|
|||
public Map<String, Object> getAllBreakpointAttributes(IBreakpoint platformBP, boolean bpManagerEnabled)
|
||||
throws CoreException
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> platformBPAttr = platformBP.getMarker().getAttributes();
|
||||
if (!bpManagerEnabled) {
|
||||
platformBPAttr.put(IBreakpoint.ENABLED, Boolean.FALSE);
|
||||
|
|
|
@ -113,13 +113,12 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
|
|||
this(launch.getSession(), getAttributes(launch), rm);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Map<String, Object> getAttributes(GdbLaunch launch) {
|
||||
try {
|
||||
return launch.getLaunchConfiguration().getAttributes();
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
return new HashMap<String, Object>();
|
||||
try {
|
||||
return launch.getLaunchConfiguration().getAttributes();
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
return new HashMap<String, Object>();
|
||||
}
|
||||
|
||||
/** @since 8.2 */
|
||||
|
|
|
@ -48,7 +48,7 @@ class ParserState {
|
|||
/**
|
||||
* Trial actions that have been executed but not yet committed.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public LinkedList pendingCommits;
|
||||
|
||||
public ConfigurationStack configurationStack;
|
||||
|
|
|
@ -211,7 +211,6 @@ public abstract class BaseTestsLaunchDelegate extends LaunchConfigurationDelegat
|
|||
* @param mode mode
|
||||
* @return launch delegate
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private ILaunchConfigurationDelegate2 getPreferredDelegate(ILaunchConfiguration config, String mode) throws CoreException {
|
||||
ILaunchManager launchMgr = DebugPlugin.getDefault().getLaunchManager();
|
||||
ILaunchConfigurationType localCfg =
|
||||
|
|
|
@ -64,7 +64,7 @@ public class UPCLanguage extends BaseExtensibleLanguage {
|
|||
|
||||
private static final ICLanguageKeywords upcKeywords = new UPCLanguageKeywords(ScannerExtensionConfiguration.createC());
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
if(ICLanguageKeywords.class.equals(adapter))
|
||||
|
|
|
@ -59,7 +59,7 @@ public class XlcCLanguage extends GCCLanguage {
|
|||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
if(ICLanguageKeywords.class.equals(adapter))
|
||||
|
|
|
@ -87,7 +87,7 @@ public class XlcCPPLanguage extends GPPLanguage {
|
|||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
if(ICLanguageKeywords.class.equals(adapter))
|
||||
|
|
Loading…
Add table
Reference in a new issue