Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 91485 invoked from network); 7 Dec 2006 14:42:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 14:42:56 -0000 Received: (qmail 95723 invoked by uid 500); 7 Dec 2006 14:43:04 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 95706 invoked by uid 500); 7 Dec 2006 14:43:04 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 95697 invoked by uid 99); 7 Dec 2006 14:43:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 06:43:04 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 06:42:56 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id C56831A9846; Thu, 7 Dec 2006 06:42:13 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r483470 - /harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java Date: Thu, 07 Dec 2006 14:42:13 -0000 To: commits@harmony.apache.org From: apetrenko@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061207144213.C56831A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: apetrenko Date: Thu Dec 7 06:42:10 2006 New Revision: 483470 URL: http://svn.apache.org/viewvc?view=rev&rev=483470 Log: Patch for HARMONY-690 "[classlib][lang]Compatibility: Harmony Runtime.removeShutdownHook(null) does not throw unspecified NPE while RI does." class library version. Null checks are added to Runtime class stub. Modified: harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java Modified: harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java?view=diff&rev=483470&r1=483469&r2=483470 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java Thu Dec 7 06:42:10 2006 @@ -270,6 +270,10 @@ * @param hook the hook (a Thread) to register */ public void addShutdownHook(Thread hook) { + // Check hook for null + if (hook == null) + throw new NullPointerException("null is not allowed here"); + return; } @@ -280,6 +284,10 @@ * @return true if the hook could be de-registered */ public boolean removeShutdownHook(Thread hook) { + // Check hook for null + if (hook == null) + throw new NullPointerException("null is not allowed here"); + return false; }