cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <h...@karlmenn.is>
Subject Improper capitalization in StringUtils.capitalizedAsConstant()
Date Tue, 14 Feb 2017 11:30:25 GMT
Hi all,
I’m encountering what I believe can be called improper capitalization in Property name creation
when doing class generation. The problem is that if the capitalization method encounters several
uppercase characters in a row, it will treat them as a single substring with the following
lowercase characters.

Example: I have an attribute called “uniqueIDFromSystem”. The Property generated is called
UNIQUE_IDFROM_SYSTEM but should probably be called UNIQUE_ID_FROM_SYSTEM.

I’m guessing changing this behaviour is not acceptable since it will probably break older
code? If so, is there any way for me to hook into the class generation mechanism to introduce
my own “fixed” property name generating method, or could we add a second fixed method
to StringUtils?

Cheers,
- hugi
Mime
View raw message