Name: ssT124754 Date: 02/08/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
In the following type of error message:
Test.java:7: method() in Test cannot implement method() in Interface;
attempting to assign weaker access privileges; was public
public class Test
^
it would be helpful if the compiler reported the line number of the declaration
of the method instead of the line number of the class.
Here's a test case:
----------------------------------------
interface Interface
{
void method();
} // interface Interface
public class Test
implements Interface
{
void method()
{
} // method()
} // class Test
----------------------------------------
Test.java:7: method() in Test cannot implement method() in Interface; attempting
to assign weaker access privileges; was public
public class Test
^
1 error
----------------------------------------
DSB/DFI
(Review ID: 116557)
======================================================================
- duplicates
-
JDK-4413455 "attemping to assign weaker access" message doesn't give method line number
- Closed
-
JDK-4278961 # error reporting and recovery issues in the new compiler
- Closed
- relates to
-
JDK-4524388 "attemping to assign weaker access" message doesn't give method line number
- Closed