This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libgcj/3144: java.lang.Date.compareTo() not supported



>Number:         3144
>Category:       libgcj
>Synopsis:       java.lang.Date.compareTo() not supported
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 12 14:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     p.thio@valescom.com
>Release:        unknown-1.0
>Organization:
>Environment:
linux; gcc_ss_20010611
>Description:
java.lang.Date.compareTo() not supported. This 1.2 functionality.
>How-To-Repeat:
The following code results in a compiler error:
import java.util.Date;

public
class Template
{
    public static
    void main(String argv[])
    {
        Date myDate1 = new Date();
        Date myDate2 = new Date();
        System.out.println(myDate1.compareTo(myDate2));
    }
}

Compiler output:
gcj --main=Template Template.java 
Template.java: In class `Template':
Template.java: In method `Template.main(java.lang.String[])':
Template.java:11: Can't find method `compareTo(Ljava/util/Date;)' in type `java.util.Date'.
           System.out.println(myDate1.compareTo(myDate2));
                                     ^
1 error
>Fix:

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]