File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
src/main/java/io/github/darvil/lanat Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -280,10 +280,10 @@ public static class Default extends CommandTemplate {
280280 */
281281 @ InitDef
282282 public static void afterInit (@ NotNull Command cmd ) {
283- cmd .addArgument (getHelpArgumentBuilder (cmd , 0 ));
283+ cmd .addArgument (Default . getHelpArgumentBuilder (cmd , 0 ));
284284
285285 if (cmd instanceof ArgumentParser ap )
286- cmd .addArgument (getVersionArgumentBuilder (ap , 0 ));
286+ cmd .addArgument (Default . getVersionArgumentBuilder (ap , 0 ));
287287 }
288288
289289 /**
Original file line number Diff line number Diff line change @@ -67,13 +67,13 @@ public static <T> T last(@NotNull List<T> list) {
6767 if (name .isBlank ())
6868 throw new IllegalArgumentException ("name must contain at least one character" );
6969
70- // if (!Character.isAlphabetic(name.charAt(0)))
71- // throw new IllegalArgumentException("name must start with an alphabetic character");
72- //
73- // if (!name.chars().allMatch(
74- // chr -> Character.isAlphabetic(chr) || Character.isDigit(chr) || chr == '_' || chr == '-'
75- // ))
76- // throw new IllegalArgumentException("name must only contain alphabetic characters, numbers, underscores and dashes");
70+ if (!Character .isAlphabetic (name .charAt (0 )))
71+ throw new IllegalArgumentException ("name must start with an alphabetic character" );
72+
73+ if (!name .chars ().allMatch (
74+ chr -> Character .isAlphabetic (chr ) || Character .isDigit (chr ) || chr == '_' || chr == '-'
75+ ))
76+ throw new IllegalArgumentException ("name must only contain alphabetic characters, numbers, underscores and dashes" );
7777
7878 return name ;
7979 }
You can’t perform that action at this time.
0 commit comments