Skip to content

Conversation

@mohamedelhabib
Copy link
Contributor

Enum constants containing known acronyms (like "SPA") were being incorrectly converted when using --acronym-style=camel, e.g. "MULTI_SPA_IN_GROUP_REJECTED" became "MULTI_Spa_IN_GROUP_REJECTED".

For Java enum constants (UPPER_UNDERSCORE style), acronyms should always remain uppercase regardless of the --acronym-style setting.

  • Modified javaNameStyle() to use allUpperWordStyle for acronyms in enum constants
  • Added test case for enum with "SPA" acronym

Description

Related Issue

Motivation and Context

Previous Behaviour / Output

New Behaviour / Output

How Has This Been Tested?

Screenshots (if appropriate):

Enum constants containing known acronyms (like "SPA") were being incorrectly
converted when using --acronym-style=camel, e.g. "MULTI_SPA_IN_GROUP_REJECTED"
became "MULTI_Spa_IN_GROUP_REJECTED".

For Java enum constants (UPPER_UNDERSCORE style), acronyms should always remain
uppercase regardless of the --acronym-style setting.

- Modified javaNameStyle() to use allUpperWordStyle for acronyms in enum constants
- Added test case for enum with "SPA" acronym
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant