[350121] - Fix warnings from the build page
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java
index 4fef8a4..9d54ee3 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorMetaData.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -350,8 +350,8 @@
if(outputContainers[i].equals(sourceContainers[j])){
return true;
}
- return false;
}
+ return false;
}
}
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java
index f495aa6..40b74a4 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidatorTypeFilter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -73,16 +73,13 @@
// doesn't implement A, then the isInstance call will return false.
//
// So, instead of using Class.isInstance, do the checking myself.
+ final String filterClassName = filterClass.getName();
for (Class cl = objectClass; cl != null; cl = cl.getSuperclass()) {
- if (cl.getName().equals(filterClass.getName())) {
- return true;
- }
+ if (cl.getName().equals(filterClassName))return true;
Class[] clInterfaces = cl.getInterfaces();
for (int i = 0; i < clInterfaces.length; i++) {
- if (clInterfaces[i].getName().equals(filterClass.getName())) {
- return true;
- }
- return isInstance(clInterfaces[i], filterClass);
+ if (clInterfaces[i].getName().equals(filterClassName))return true;
+ if (isInstance(clInterfaces[i], filterClass))return true;
}
}
return false;
diff --git a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/ValManager.java b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/ValManager.java
index a177c7c..0fd1c2a 100644
--- a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/ValManager.java
+++ b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/ValManager.java
@@ -1039,7 +1039,6 @@
* Map validator id's to Integers. The integers correspond to bits in the ValProperty instances.
*/
private final Map<String, Integer> _map = new HashMap<String, Integer>(100);
- private final Map<Integer, String> _reverseMap = new HashMap<Integer, String>(100);
/** Next available bit. */
private int _next;
@@ -1055,39 +1054,9 @@
i = _next++;
_map.put(id, i);
- _reverseMap.put(i, id);
return i;
- }
-
- /**
- * Answer the validator id for the index.
- * @param index
- * @return null if the index number has not been set.
- */
- public synchronized String getId(Integer index){
- return _reverseMap.get(index);
- }
-
- public synchronized void reset(){
- _map.clear();
- _reverseMap.clear();
- _next = 0;
- }
-
- /**
- * Answer the ids for the bit in the bitset. This is used for debugging.
- * @param bs
- */
- public synchronized String[] getIds(BitSet bs){
- List<String> list = new LinkedList<String>();
- for(int i=bs.nextSetBit(0); i>=0; i=bs.nextSetBit(i+1)) {
- String id = getId(i);
- if (id != null)list.add(id);
- }
- String[] s = new String[list.size()];
- return list.toArray(s);
- }
+ }
}
/**
diff --git a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java
index e50df61..dffd276 100644
--- a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java
+++ b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 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
@@ -512,7 +512,6 @@
@Override
public Boolean matchesResource(IResource resource, ContentTypeWrapper wrapper) {
String name = PortableFileDelim + resource.getProjectRelativePath().toPortableString();
- if (name == null)return Boolean.FALSE;
return _compiledPattern.matcher(name).matches();
}
}