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]
Other format: [Raw text]

java/8043: gcj rejects call to legal method (getTimeInMillis) in Calendar class


>Number:         8043
>Category:       java
>Synopsis:       gcj rejects call to legal method (getTimeInMillis) in Calendar class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 12:06:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Chris Niziol
>Release:        gcc version 3.2
>Organization:
>Environment:
System: SunOS hdsdev01 5.6 Generic_105181-32 sun4u sparc SUNW,Ultra-250
Architecture: sun4
>Description:
$ gcj Test.java
Test.java: In class `Test':
Test.java: In method `Test.main(java.lang.String[])':
Test.java:10: Can't access protected method `java.util.Calendar.getTimeInMillis'
 from `Test'.
         System.out.println("Time In Millis:" + myCal.getTimeInMillis());
                                                     ^
>How-To-Repeat:
Compile and run this with java sdk 1.4.x:

class Test
{
   public static void main(String args[])
   {
      Calendar myCal = Calendar.getInstance();
      System.out.println("Time In Millis:" + myCal.getTimeInMillis());
   }
}
>Fix:
Access level for method should be changed to public
>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]