[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5748) java.util.Map.get(string) returns null value if there is no value for the key searched.
Suresh Thummalapenta (JIRA)
noreply at atlassian.com
Sun Nov 21 16:27:13 EST 2010
java.util.Map.get(string) returns null value if there is no value for the key searched.
---------------------------------------------------------------------------------------
Key: HHH-5748
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5748
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0
Reporter: Suresh Thummalapenta
Priority: Minor
We developed a mining-based approach that recovers specifications for APIs of JavaSDK and uses those specifications to detect defects statically. In our study, we found that at various places, return checks are missing in the core component of Hibernate. It would be great if you could analyze and fix those issues.
class: ManagedSessionContext.java
Method: existingSession, Line 124
Missing null check for "sessionMap.get( factory )", since java.util.Map.get(string) returns null value if there is no value for the key searched in the Map
Class: NamedParameterSpecification.java
Method: bind, Line 66
Missing null check for qp.getNamedParameters().get( name ), since get() method returns null value if there is no value for the key searched in the map.
class: PersistentIdentifierBag.java
Method: equalsSnapshot, Line 231
Missing null check on "old" in the statement "Object old = snap.get(id);", since get() method returns null value if there is no value for the key searched in the map.
Class: StructuredCacheEntry.java
Method: destructure, Line: 54
Missing null check on the return of map.get( names[i] ), since get() method returns null value if there is no value for the key searched in the map.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list