[EMAIL PROTECTED] wrote:
Removed superfluous cast
Revision Changes Path
1.91 +1 -1 ant/src/main/org/apache/tools/ant/AntClassLoader.java
Index: AntClassLoader.java
if (cons.length > 0 && cons[0] != null) {
final String[] strs = new String[NUMBER_OF_STRINGS];
try {
- cons[0].newInstance((Object[])strs);
+ cons[0].newInstance(strs);


This is not superfluous on Java1.5, as things need to be of type Object[]. If you call newInstance(String[]), then you may be calling new(String[]) on the class, not new(String, String, ...).

I should have put a comment above the line to emphasise this.

-steve

(who doesnt know whether the 1.5 changes are wondrous or evil)

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



Reply via email to