Skip to content

Commit

Permalink
fix for javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Davenport committed May 28, 2024
1 parent cddb439 commit c2064a7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,21 @@ public static String toPlural(String value) {
* @param string a string which might contain invalid characters for a valid GraphQL name
* @return a valid GraphQL name based on the input string
*/
public static String makeValidName(String name) {
public static String makeValidName(String string) {

if (name == null) {
if (string == null) {
return "null";
}

if (name.isBlank()) {
if (string.isBlank()) {
return "blank";
}

if (name.matches("^\\d.*$")) {
name = "N" + name;
if (string.matches("^\\d.*$")) {
string = "N" + string;
}

return name.
return string.
replace("-", "_").
replace("/", "_").
replace(".", "_"); // TODO other replacements
Expand Down

0 comments on commit c2064a7

Please sign in to comment.