Incorrect usage of Iterator.next method
---------------------------------------
Key: HHH-5745
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5745
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.
It would be good to have a condition check on hasNext() before invoking
getColumnIterator().next(), since the next() method can throw NoSuchElementExcetion if
there are no elements. currently, it is missing in the following places:
Class: AbstractEntityPersister.java
method: AbstractEntityPersister, Line: 511
Class: SimpleValue.java
Method: createIdentifierGenerator, Line: 165
Class: SingleTableEntityPersister.java
Method: SingleTableEntityPersister, Line: 294
Class: Table.java
Method: sqlCreateString, Line: 398
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira