Bug 123

Summary: Use of "enum" as variable name should be eliminated in
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: windows   
Type: DEFECT SCM Refs:
Workaround: ---

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