From owner-freebsd-java@FreeBSD.ORG Fri Jun 8 01:50:03 2007 Return-Path: X-Original-To: freebsd-java@hub.freebsd.org Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B5AB16A421 for ; Fri, 8 Jun 2007 01:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 58AF113C447 for ; Fri, 8 Jun 2007 01:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l581o39x036966 for ; Fri, 8 Jun 2007 01:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l581o3Ym036965; Fri, 8 Jun 2007 01:50:03 GMT (envelope-from gnats) Resent-Date: Fri, 8 Jun 2007 01:50:03 GMT Resent-Message-Id: <200706080150.l581o3Ym036965@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-java@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Backhaus Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A702916A41F for ; Fri, 8 Jun 2007 01:42:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 97DC813C455 for ; Fri, 8 Jun 2007 01:42:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l581gTde012007 for ; Fri, 8 Jun 2007 01:42:29 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l581gTCs012005; Fri, 8 Jun 2007 01:42:29 GMT (envelope-from nobody) Message-Id: <200706080142.l581gTCs012005@www.freebsd.org> Date: Fri, 8 Jun 2007 01:42:29 GMT From: Robert Backhaus To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: java/113467: Multiple "missing return value" errors building JDK on current X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2007 01:50:03 -0000 >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@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: