From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27663 invoked by alias); 26 Feb 2003 02:46:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27637 invoked by uid 71); 26 Feb 2003 02:46:00 -0000 Resent-Date: 26 Feb 2003 02:46:00 -0000 Resent-Message-ID: <20030226024600.27635.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, jjc@jclark.com Received: (qmail 26057 invoked by uid 48); 26 Feb 2003 02:42:07 -0000 Message-Id: <20030226024207.26056.qmail@sources.redhat.com> Date: Wed, 26 Feb 2003 02:46:00 -0000 From: jjc@jclark.com Reply-To: jjc@jclark.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libgcj/9854: GregorianCalendar does not validate months correctly X-SW-Source: 2003-02/txt/msg01350.txt.bz2 List-Id: >Number: 9854 >Category: libgcj >Synopsis: GregorianCalendar does not validate months correctly >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Feb 26 02:46:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: jjc@jclark.com >Release: 3.3 20030217 >Organization: >Environment: >Description: GregorianCalendar fails to check months for validity as illustrated by the following example. (It also appears not to check days of the month.) import java.util.GregorianCalendar; class DateTest { static public void main(String[] args) { GregorianCalendar cal = new GregorianCalendar(); cal.setLenient(false); cal.set(2000, -1, 20, 5, 5, 5); try { cal.getTime(); System.err.println("incorrectly allowed"); } catch (IllegalArgumentException e) { System.err.println("correctly detected as illegal"); } } } >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: