commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] Created: (LANG-568) @SuppressWarnings("unchecked") is used too generally
Date Wed, 16 Dec 2009 15:33:18 GMT
@SuppressWarnings("unchecked") is used too generally

                 Key: LANG-568
             Project: Commons Lang
          Issue Type: Bug
          Components: General
            Reporter: Sebb
             Fix For: 3.0

@SuppressWarnings("unchecked") is used in several places on entire methods.
Mostly there is no documentation as to why it is safe to ignore the warnings.

Seems to me the annotation should be used as close as possible to the site of the warning,
and the reason should be documented, so it can be revisited if there is a code change later.

In fact, at least one of the warnings is NOT safe to ignore:

ArrayUtils.<String>add((String[])null, null);

generates a ClassCastException, which should not happen if the warning is OK to ignore.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message