Bug 7785 - Calendar.getTimeInMillis/setTimeInMillis should be public
Summary: Calendar.getTimeInMillis/setTimeInMillis should be public
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.3
: P3 normal
Target Milestone: ---
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-30 19:46 UTC by jmr
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmr 2002-08-30 19:46:00 UTC
	Both Calendar.getTimeInMillis and Calendar.setTimeInMillis are
        specified as public in Sun's javadoc, but libjava declares them
        as protected.

Release:
3.3 20020828 (experimental)

Environment:
System: Linux churchill 2.4.3-12 #1 Fri Jun 8 15:05:56 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/home/user/jmr/app/gcc --enable-langs=c++,java --enable-shared --enable-threads=posix --with-as=/home/user/jmr/app/binutils/bin/as --with-ld=/home/user/jmr/app/binutils/bin/ld : (reconfigured)
Comment 1 jmr 2002-08-30 19:46:00 UTC
Fix:
--- Calendar.java       18 Jun 2002 15:39:48 -0000      1.13
+++ Calendar.java       31 Aug 2002 02:41:16 -0000
@@ -505,7 +505,7 @@
    * Returns the time represented by this Calendar.
    * @return the time in milliseconds since the epoch.
    */
-  protected long getTimeInMillis()
+  public long getTimeInMillis()
   { 
     if (!isTimeSet)
       computeTime();
@@ -517,7 +517,7 @@
    * are invalidated by this method.
    * @param time the time in milliseconds since the epoch
    */
-  protected void setTimeInMillis(long time)
+  public void setTimeInMillis(long time)
   { 
     this.time = time;
     isTimeSet = true;
Comment 2 Tom Tromey 2002-08-30 22:24:42 UTC
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-Why: I'm handling this.
Comment 3 Tom Tromey 2002-08-30 22:24:42 UTC
State-Changed-From-To: open->closed
State-Changed-Why: I'm checking this in along with a javadoc update.
    Thanks.
Comment 4 Tom Tromey 2002-08-30 23:24:34 UTC
From: Tom Tromey <tromey@redhat.com>
To: jmr@ugcs.caltech.edu
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/7785: Calendar.getTimeInMillis/setTimeInMillis should be public
Date: 30 Aug 2002 23:24:34 -0600

 >> Synopsis:       Calendar.getTimeInMillis/setTimeInMillis should be public
 
 Thanks.  I'll make this change shortly.
 I'm also going to add a bit of javadoc.  These methods were made
 public in 1.4.
 
 Tom

Comment 5 Tom Tromey 2002-08-30 23:25:08 UTC
From: Tom Tromey <tromey@redhat.com>
To: jmr@ugcs.caltech.edu
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/7785: Calendar.getTimeInMillis/setTimeInMillis should be public
Date: 30 Aug 2002 23:25:08 -0600

 >> Synopsis:       Calendar.getTimeInMillis/setTimeInMillis should be public
 
 Also, FYI: just send patches like this with a ChangeLog entry to the
 java-patches list.  There's no need for a PR for them.
 
 Tom

Comment 6 Tom Tromey 2002-08-31 05:27:16 UTC
From: tromey@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/7785
Date: 31 Aug 2002 05:27:16 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	tromey@gcc.gnu.org	2002-08-30 22:27:15
 
 Modified files:
 	libjava        : ChangeLog 
 	libjava/java/util: Calendar.java 
 
 Log message:
 	2002-08-30  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
 	
 	* java/util/Calendar.java (getTimeInMillis, getTimeInMillis): Now
 	public, per 1.4 spec.  Fixes PR libgcj/7785.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1424&r2=1.1425
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/Calendar.java.diff?cvsroot=gcc&r1=1.13&r2=1.14