X Tutup
The Wayback Machine - https://web.archive.org/web/20201204213942/https://github.com/openlowcode/Open-Lowcode/issues/20
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control if strings are valid java class name or field names in StringFormatter #20

Open
openlowcode opened this issue Jan 29, 2020 · 3 comments

Comments

@openlowcode
Copy link
Owner

@openlowcode openlowcode commented Jan 29, 2020

The following methods generate strings to be used for fields or classes inside java code. It should be checked if the string given as attribute is a valid java class / method name (does not start by a digit, no forbidden characters):

  • formatForJavaClass
  • formatForAttribute
@mypablo
Copy link

@mypablo mypablo commented Mar 10, 2020

I cant find classes/methods

formatForJavaClass
formatForAttribute
@openlowcode
Copy link
Owner Author

@openlowcode openlowcode commented Mar 10, 2020

Hi,

warm welcome to Open Lowcode project.

The class to modify is:
org.openlowcode.tools.file.StringFormatter

@openlowcode
Copy link
Owner Author

@openlowcode openlowcode commented Mar 11, 2020

Also, the controls needed are basically to check that the string passed:

  • starts with a letter
  • contains only letter and number as subsequent characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup