Bug 123 - Use of "enum" as variable name should be eliminated in
Summary: Use of "enum" as variable name should be eliminated in
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All windows
: P3 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2004-12-05 05:32 CET by Sven Gothel
Modified: 2010-03-24 07:47 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:47:10 CET


---- Reported by yvg 2004-12-05 05:32:36 ----

When building under JDK 1.5, javac compiler issues some warnings related to the 
use of "enum" as variable name. It should be changed to something else for 
eliminating this warinig and for better future compatibility:

Here is output from javac:

    [javac] Compiling 70 source files to D:\CVS\jogl\build\classes
    [javac] 
D:\CVS\jogl\src\net\java\games\gluegen\JavaMethodBindingEmitter.java:234: 
warning: as of release 1.5, 'enum' is a keyword, and may not be used as an 
identifier
    [javac] (try -source 1.5 to use 'enum' as a keyword)
    [javac]           EnumType enum = (EnumType)type;
    [javac]                    ^
    [javac] 
D:\CVS\jogl\src\net\java\games\gluegen\JavaMethodBindingEmitter.java:241: 
warning: as of release 1.5, 'enum' is a keyword, and may not be used as an 
identifier
    [javac] (try -source 1.5 to use 'enum' as a keyword)
    [javac]           for (int j = 0; j < enum.getNumEnumerates(); ++j) {
    [javac]                               ^
    [javac] 
D:\CVS\jogl\src\net\java\games\gluegen\JavaMethodBindingEmitter.java:243: 
warning: as of release 1.5, 'enum' is a keyword, and may not be used as an 
identifier
    [javac] (try -source 1.5 to use 'enum' as a keyword)
    [javac]             writer.print(enum.getEnumName(j));
    [javac]                          ^
    [javac] Note: * uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 3 warnings

     [echo] GlueGen has been built successfully.

Yuri



---- Additional Comments From kbr 2004-12-06 18:10:38 ----

This has been fixed in the CVS repository and will show up in the next beta
(probably 1.1 beta 08).




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 123 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=123