Hello,

in several places in class TagLibrary, I see code like the following:

Object value = tags.get(name);
if (value instanceof Class) {
Class type = (Class) value;
if ( type != null ) {
return TagScript.newInstance(type);
}


my question is: doesnt "value instanceof Class" always return false if value is null? Isnt the null check therefore redundant?

If that is true, the lines

Class type = (Class) tags.get(name);
if ( type != null ) {
return (Tag) type.newInstance();
}

in method createTag() are also redundant.

regards,
Christian Sell


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to