private final boolean readOnly;
- private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
- 1000);
+ private final ConcurrentCache<String, BeanProperties> cache =
+ new ConcurrentCache<String, BeanProperties>(1000);
public BeanELResolver() {
this.readOnly = false;
this.type = descriptor.getPropertyType();
}
- @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match specification
- public Class getPropertyType() {
+ // Can't use Class<?> because API needs to match specification
+ public @SuppressWarnings("unchecked") Class getPropertyType() {
return this.type;
}
this.resolved = false;
}
- @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match specification
- public Object getContext(Class key) {
+ // Can't use Class<?> because API needs to match specification
+ public Object getContext(@SuppressWarnings("unchecked") Class key) {
if (this.map == null) {
return null;
}
return this.map.get(key);
}
- @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match specification
- public void putContext(Class key, Object contextObject) throws NullPointerException {
+ // Can't use Class<?> because API needs to match specification
+ public void putContext(@SuppressWarnings("unchecked") Class key,
+ Object contextObject) throws NullPointerException {
if (key == null || contextObject == null) {
throw new NullPointerException();
}
}
@Override
- @SuppressWarnings("unchecked") // Can't use Iterator<FeatureDescriptor> because API needs to match specification
- public Iterator getFeatureDescriptors(ELContext context, Object base) {
+ // Can't use Iterator<FeatureDescriptor> because API needs to match specification
+ public @SuppressWarnings("unchecked") Iterator getFeatureDescriptors(
+ ELContext context, Object base) {
if (base instanceof ResourceBundle) {
List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
Enumeration<String> e = ((ResourceBundle) base).getKeys();
defineClass("org.apache.catalina.loader.JdbcLeakPrevention",
classBytes, 0, offset);
Object obj = lpClass.newInstance();
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // clearJdbcDriverRegistrations() returns List<String>
List<String> driverNames = (List<String>) obj.getClass().getMethod(
"clearJdbcDriverRegistrations").invoke(obj);
for (String name : driverNames) {
private final void clearReferencesStaticFinal() {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // resourceEntries is HashMap<String, ResourceEntry>
Collection<ResourceEntry> values =
((HashMap<String,ResourceEntry>) resourceEntries.clone()).values();
Iterator<ResourceEntry> loadedClasses = values.iterator();
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("deprecation") // thread.stop()
private void clearReferencesThreads() {
Thread[] threads = getThreads();
return coerceToString(obj0).compareTo(coerceToString(obj1));
}
if (obj0 instanceof Comparable<?>) {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // checked above
final Comparable<Object> comparable = (Comparable<Object>) obj0;
return (obj1 != null) ? comparable.compareTo(obj1) : 1;
}
if (obj1 instanceof Comparable<?>) {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // checked above
final Comparable<Object> comparable = (Comparable<Object>) obj1;
return (obj0 != null) ? -comparable.compareTo(obj0) : -1;
}
}
@Override
- @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match specification in super-class
- public Object getContext(Class key) {
+ // Can't use Class<?> because API needs to match specification in superclass
+ public Object getContext(@SuppressWarnings("unchecked") Class key) {
return this.elContext.getContext(key);
}
}
@Override
- @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match specification in super-class
- public void putContext(Class key, Object contextObject) {
+ // Can't use Class<?> because API needs to match specification in superclass
+ public void putContext(@SuppressWarnings("unchecked") Class key,
+ Object contextObject) {
this.elContext.putContext(key, contextObject);
}
ctx.getELResolver().setValue(ctx, null, this.image, value);
}
- @SuppressWarnings("unchecked")
@Override
- public Object invoke(EvaluationContext ctx, Class[] paramTypes,
+ // Interface el.parser.Node uses raw types (and is auto-generated)
+ public Object invoke(EvaluationContext ctx,
+ @SuppressWarnings("unchecked") Class[] paramTypes,
Object[] paramValues) throws ELException {
return this.getMethodExpression(ctx).invoke(ctx.getELContext(), paramValues);
}
- @SuppressWarnings("unchecked")
@Override
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
+ // Interface el.parser.Node uses raw types (and is auto-generated)
+ public MethodInfo getMethodInfo(EvaluationContext ctx,
+ @SuppressWarnings("unchecked") Class[] paramTypes)
throws ELException {
return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
}
- @SuppressWarnings("unchecked")
@Override
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
+ // Interface el.parser.Node uses raw types (and is auto-generated)
+ public MethodInfo getMethodInfo(EvaluationContext ctx,
+ @SuppressWarnings("unchecked") Class[] paramTypes)
throws ELException {
Target t = getTarget(ctx);
Method m = ReflectionUtil.getMethod(t.base, t.property, paramTypes);
.getParameterTypes());
}
- @SuppressWarnings("unchecked")
@Override
- public Object invoke(EvaluationContext ctx, Class[] paramTypes,
+ // Interface el.parser.Node uses a raw type (and is auto-generated)
+ public Object invoke(EvaluationContext ctx,
+ @SuppressWarnings("unchecked") Class[] paramTypes,
Object[] paramValues) throws ELException {
Target t = getTarget(ctx);
Method m = ReflectionUtil.getMethod(t.base, t.property, paramTypes);
}
}
- @SuppressWarnings("unchecked")
- public Object invoke(EvaluationContext ctx, Class[] paramTypes,
+ // Interface el.parser.Node uses raw types (and is auto-generated)
+ public Object invoke(EvaluationContext ctx,
+ @SuppressWarnings("unchecked") Class[] paramTypes,
Object[] paramValues) throws ELException {
throw new UnsupportedOperationException();
}
- @SuppressWarnings("unchecked")
+ // Interface el.parser.Node uses a raw type (and is auto-generated)
public MethodInfo getMethodInfo(EvaluationContext ctx,
- Class[] paramTypes) throws ELException {
+ @SuppressWarnings("unchecked") Class[] paramTypes)
+ throws ELException {
throw new UnsupportedOperationException();
}
}
}
@Override
- @SuppressWarnings("unchecked")
- protected ArrayList list(File file) {
- ArrayList entries = super.list(file);
+ protected ArrayList<NamingEntry> list(File file) {
+ ArrayList<NamingEntry> entries = super.list(file);
// adds virtual tlds for WEB-INF listing
if ("WEB-INF".equals(file.getName())) {