Open glassfishrobot opened 11 years ago
Reported by rgaberina
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
This issue was imported from java.net JIRA CODEMODEL-18
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]