[Swift-devel] [Bug 239] New: Java 1.5 compatibility issue - @Override

bugzilla-daemon at mcs.anl.gov bugzilla-daemon at mcs.anl.gov
Wed Dec 29 20:46:58 CST 2010


https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=239

           Summary: Java 1.5 compatibility issue - @Override
           Product: Swift
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: General
        AssignedTo: hategan at mcs.anl.gov
        ReportedBy: dk0966 at cs.ship.edu


When trying to build swift with Java 1.5, I receive errors related to the use
of @Override.

In Java 1.5 you can only use the @Override annotation when overriding methods
of a class. If the method is defined in an interface rather than a superclass,
a compilation error will occur. (1.6 allows @Override for both classes and
interfaces)

I ran into this when trying to build swift on sisboombah. Patch attached.

java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_14-b03, mixed mode)

Ant output
compile:
     [echo] [util]: COMPILE
    [mkdir] Created dir: /home/dk0966/cog/modules/util/build
    [javac] Compiling 53 source files to /home/dk0966/cog/modules/util/build
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:71:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:105:
method does not override a method from its superclass
    [javac]     @Override
    [javac]          ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:144:
method does not override a method from its superclass
    [javac]     @Override
    [javac]          ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:227:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:232:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:237:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:242:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:247:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:252:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac]
/home/dk0966/cog/modules/util/src/org/globus/cog/util/CopyOnWriteArrayList.java:257:
method does not override a method from its superclass
    [javac]     @Override
    [javac]      ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 10 errors

-- 
Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.



More information about the Swift-devel mailing list