JDK-7140882 : Don't return booleans from methods returning pointers
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-30
  • Updated: 2012-10-08
  • Resolved: 2012-02-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed OpenJDK6,hs23Fixed
Description
The methods constantPoolOopDesc::method_at_if_loaded() and  CountedLoopNode::match_incr_with_optional_truncation() both have "return false" statements even though their actual return values are pointers (methodOop and Node*).

This is wrong and it will cause builds to fail with GCC 4.7.

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/f457154eee8b
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/f457154eee8b
03-02-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f457154eee8b
30-01-2012

EVALUATION Change "return false" to "return NULL". Patch provided by Deepak Bhole.
30-01-2012