jaxb-codemodel icon indicating copy to clipboard operation
jaxb-codemodel copied to clipboard

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

Open glassfishrobot opened this issue 12 years ago • 3 comments

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 avatar Aug 01 '13 16:08 glassfishrobot

Reported by rgaberina

glassfishrobot avatar Aug 01 '13 16:08 glassfishrobot

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 avatar Sep 11 '13 10:09 glassfishrobot

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

glassfishrobot avatar Apr 24 '17 07:04 glassfishrobot