mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Fix warnings.
This commit is contained in:
parent
843732d750
commit
cd81b282d5
9 changed files with 14 additions and 13 deletions
|
@ -203,10 +203,11 @@ public class ASTPrinter {
|
|||
IASTDeclarator declarator = (IASTDeclarator) n;
|
||||
|
||||
IASTPointerOperator[] pointers = declarator.getPointerOperators();
|
||||
if(pointers != null && pointers.length > 0)
|
||||
if(pointers != null && pointers.length > 0) {
|
||||
out.println();
|
||||
for (IASTPointerOperator pointer : pointers) {
|
||||
print(out, indentLevel+1, pointer);
|
||||
for (IASTPointerOperator pointer : pointers) {
|
||||
print(out, indentLevel+1, pointer);
|
||||
}
|
||||
}
|
||||
if (declarator instanceof IASTArrayDeclarator) {
|
||||
IASTArrayDeclarator decl = (IASTArrayDeclarator)declarator;
|
||||
|
|
|
@ -27,7 +27,7 @@ public class WeakHashSet<T> {
|
|||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof HashableWeakReference)) return false;
|
||||
if (!(obj instanceof HashableWeakReference<?>)) return false;
|
||||
Object referent = get();
|
||||
Object other = ((HashableWeakReference<?>) obj).get();
|
||||
if (referent == null) return other == null;
|
||||
|
|
|
@ -178,7 +178,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
|
|||
ObjectInputStream input= new ObjectInputStream(zip.getInputStream(indexEntry));
|
||||
try {
|
||||
Object obj= input.readObject();
|
||||
if (obj instanceof Map) {
|
||||
if (obj instanceof Map<?, ?>) {
|
||||
return (Map<?,?>) obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -580,7 +580,7 @@ public class CDocumentProvider extends TextFileDocumentProvider {
|
|||
|
||||
private void overlayMarkers(Position position, ProblemAnnotation problemAnnotation) {
|
||||
Object value= getAnnotations(position);
|
||||
if (value instanceof List) {
|
||||
if (value instanceof List<?>) {
|
||||
List<?> list= (List<?>) value;
|
||||
for (Object element : list)
|
||||
setOverlay(element, problemAnnotation);
|
||||
|
@ -681,7 +681,7 @@ public class CDocumentProvider extends TextFileDocumentProvider {
|
|||
Position position= getPosition(annotation);
|
||||
synchronized (getLockObject()) {
|
||||
Object cached= fReverseMap.get(position);
|
||||
if (cached instanceof List) {
|
||||
if (cached instanceof List<?>) {
|
||||
List<?> list= (List<?>) cached;
|
||||
list.remove(annotation);
|
||||
if (list.size() == 1) {
|
||||
|
|
|
@ -159,7 +159,7 @@ public class CodeTemplatePreferencePage extends PropertyAndPreferencePage {
|
|||
*/
|
||||
@Override
|
||||
public void applyData(Object data) {
|
||||
if (data instanceof Map) {
|
||||
if (data instanceof Map<?, ?>) {
|
||||
Object id= ((Map<?, ?>) data).get(DATA_SELECT_TEMPLATE);
|
||||
if (id instanceof String) {
|
||||
final TemplatePersistenceData[] templates= fCodeTemplateConfigurationBlock.fTemplateStore.getTemplateData();
|
||||
|
|
|
@ -332,7 +332,7 @@ public abstract class PropertyAndPreferencePage extends PreferencePage implement
|
|||
*/
|
||||
@Override
|
||||
public void applyData(Object data) {
|
||||
if (data instanceof Map) {
|
||||
if (data instanceof Map<?, ?>) {
|
||||
fData= (Map<?,?>) data;
|
||||
}
|
||||
if (fChangeWorkspaceSettings != null) {
|
||||
|
|
|
@ -374,7 +374,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
|
|||
|
||||
if (bucket == null) {
|
||||
fHashBuckets.put(hash, word);
|
||||
} else if (bucket instanceof ArrayList) {
|
||||
} else if (bucket instanceof ArrayList<?>) {
|
||||
@SuppressWarnings("unchecked")
|
||||
final ArrayList<Object> bucket2 = (ArrayList)bucket;
|
||||
bucket2.add(word);
|
||||
|
@ -553,7 +553,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
|
|||
Iterator<Serializable> iter= fHashBuckets.values().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Object element= iter.next();
|
||||
if (element instanceof ArrayList)
|
||||
if (element instanceof ArrayList<?>)
|
||||
((ArrayList<?>)element).trimToSize();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ListContentProvider implements IStructuredContentProvider {
|
|||
}
|
||||
|
||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||
if (newInput instanceof List)
|
||||
if (newInput instanceof List<?>)
|
||||
fContents= (List<?>)newInput;
|
||||
else
|
||||
fContents= null;
|
||||
|
|
|
@ -539,7 +539,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
|
|||
|
||||
public Object[] getElements(Object inputElement) {
|
||||
String[] els = null;
|
||||
if (inputElement instanceof Map) {
|
||||
if (inputElement instanceof Map<?, ?>) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String,?> m = (Map)inputElement;
|
||||
els = new String[m.size()];
|
||||
|
|
Loading…
Add table
Reference in a new issue