Skip to content

Commit 4c8431a

Browse files
committed
refactoring
1 parent c7f0b2a commit 4c8431a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/net/jbock/compiler/view/Helper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static MethodSpec readRegularOptionMethod(
134134
.addParameter(token)
135135
.returns(context.optionType());
136136

137-
spec.beginControlFlow("if ($N.length() <= 1 || $N.charAt(0) != '-')", token, token)
137+
spec.beginControlFlow("if ($N.length() < 2 || $N.charAt(0) != '-')", token, token)
138138
.addStatement("return null")
139139
.endControlFlow();
140140

@@ -311,15 +311,15 @@ private CodeBlock repeatablePositionalStream(Param param) {
311311
.build();
312312
}
313313

314-
public FieldSpec positionalParsersField() {
314+
FieldSpec positionalParsersField() {
315315
return positionalParsersField;
316316
}
317317

318-
public MethodSpec readMethod() {
318+
MethodSpec readMethod() {
319319
return readMethod;
320320
}
321321

322-
public MethodSpec readRegularOptionMethod() {
322+
MethodSpec readRegularOptionMethod() {
323323
return readRegularOptionMethod;
324324
}
325325
}

0 commit comments

Comments
 (0)