java/113467: Multiple "missing return value" errors building JDK on current

Robert Backhaus robbak at gmail.com
Fri Jun 8 01:50:03 UTC 2007


>Number:         113467
>Category:       java
>Synopsis:       Multiple "missing return value" errors building JDK on current
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-java
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 08 01:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Robert Backhaus
>Release:        "missing return value"
>Organization:
>Environment:
FreeBSD boffin 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Thu Jun  7 22:50:40 EST 2007     root at boffin:/usr/obj/usr/src/sys/BOFFIN  i386

>Description:
/ports/jdk15 does not build on current for me. The build end with multiple errors like this:

./../../../../src/share/classes/java/lang/reflect/AccessibleObject.java:131: missing return value
        return override;
        ^
./../../../../src/share/classes/java/lang/reflect/AccessibleObject.java:175: missing return value
        return getAnnotation(annotationClass) != null;
        ^
./../../../../src/share/classes/java/lang/reflect/AccessibleObject.java:179: missing return value
        return getDeclaredAnnotations();
        ^
It appears (to me) that this may be an instance of this issue (quote from http://blogs.sun.com/tor/entry/code_advice_9_avoid_null )

Null handling has gotten some renewed attention recently. With the advent of annotations, you can annotate whether a method is expected to return null or not (e.g. with @notnull). This allows tools to perform static analysis of your code and find potential bugs. For example, if you indicate that a method cannot return null, the tool can obviously flag any "return null" statements within that method (or returning expressions calling methods that may return null). But they can also flag code calling this method that unnecessarily check the return value for null, and more importantly, flag missing return value checks in code calling methods that may return null.

(especially the last sentence)

Full script of java build can be provided if requested.
>How-To-Repeat:
Build ports/java/jdk15 on a recent _CURRENT.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-java mailing list