[jboss-jira] [JBoss JIRA] Created: (JBAS-4730) Code smell in SpyMapMessage

Heiko W. Rupp (JIRA) jira-events at lists.jboss.org
Sun Sep 16 03:18:11 EDT 2007


Code smell in SpyMapMessage
---------------------------

                 Key: JBAS-4730
                 URL: http://jira.jboss.com/jira/browse/JBAS-4730
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JMS service
    Affects Versions: JBossAS-4.2.0.GA, JBossAS-4.2.2.GA
         Environment: Branch_4_2 from around 7.sept.07
            Reporter: Heiko W. Rupp
         Assigned To: Adrian Brock
            Priority: Minor


SpyMapMessage has in getInt()

      if (value == null)
         return Integer.parseInt(null);


Integer.parseInt(null) will always throw a NumberFormatException, so the return statement has no effect. This leads to believe that something else was in mind when writing the code.
If the NFE was intended to be thrown, then it should in my opinion directly be done there.

getLong() has similar code and I guess other methods as well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list