Community Forums
Combination View Flat View Tree View
Threads [ Previous | Next ]
ServiceBuilder entities required to start with Capital letter from 4.3.6?
toggle
LEP-4397 highlights a change in the naming requirements for entities. (See my last comment there)

For some external developers this will mean renaming entities and modifing large amounts of code, patching database content and also in some instances having external links to certain servlet paramters no longer resolve.

Again, I believe since it was not previously a requirement it should not be made so all of a sudden.

Removing the if() in line 84 of portal-kernel\src\com\liferay\portal\kernel\util\ClassUtil.java would fix this, but I won't check that in without discussion/approval here.

/jesper
Hi Jesper,

LEP-4397 should have been a change only in 4.4.x. It also wasn't supposed to make it so that the generated code is any different, just that the pattern for the generated code is now in a freemarker template instead of in a java class.

I don't think we need to change ClassUtil ? It should just be a change in the FTL no?
The FTL's are OK.

The issue is that ServiceBuilder uses formatter which uses ClassUtil to find out which class imports can be removed.
getClasses() doesn't count classes that doesn't begin with a capital letter as classes, and thus the imports get removed, which causes the generated code not to compile.

/j
Ahh... the import stripper emoticon

Yes. I think it'll be fine for you to check in your fix. That class is just used for source formatting. Thanks for noticing that Jesper.
Btw.. you should put up your avatar. Cause I just think of a "question" mark when I think of your name. emoticon
emoticon Oops will have to get myself a haircut then....
There you go.... Look! No hair!
emoticon