javaee / jaxb-codemodel

CodeModel is a Java library for code generators. This content is migrated into JAXB RI. This is for legacy viewing only
https://javaee.github.io/jaxb-codemodel/
Other
40 stars 20 forks source link

JCodeModel._class(String fullyQualifiedName) is not case sensitive with respect to the Class name. #18

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

JCodeModel._class(String fullyQualifiedName) is not case sensitive with respect to the class name. But JCodeModel._getClass(String fullyQualifiedName) is case sensitive. I have created a class called "AB_Cdef" in the model. When I try to create the class "AB_cdef", I get an JClassAlreadyExistsException exception. But when I tried to get the class "AB_cdef" from the model, it returned null. The sequence of code executed is as follows:

JCodeModel model = new JCodeModel(); try { model._class("com.a.b.c.AB_Cdef"); model._class("com.a.b.c.AB_cdef");//throws JClassAlreadyExistsException } catch(JClassAlreadyExistsException e) { JDefinedClass cls = model._getClass("com.a.b.c.AB_cdef");//returns null }

Hope this explains the situation.

Environment

OS: Windows 7

Affected Versions

[2.6]

glassfishrobot commented 11 years ago

Reported by rgaberina

glassfishrobot commented 10 years ago

phax said: If you set the system property "com.sun.codemodel.FileSystemCaseSensitive" to a non-null value, it will be case sensitive, even on Windows

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA CODEMODEL-18