Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Oct 18, 2019
1 parent c7f0b2a commit 4c8431a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/net/jbock/compiler/view/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private static MethodSpec readRegularOptionMethod(
.addParameter(token)
.returns(context.optionType());

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

Expand Down Expand Up @@ -311,15 +311,15 @@ private CodeBlock repeatablePositionalStream(Param param) {
.build();
}

public FieldSpec positionalParsersField() {
FieldSpec positionalParsersField() {
return positionalParsersField;
}

public MethodSpec readMethod() {
MethodSpec readMethod() {
return readMethod;
}

public MethodSpec readRegularOptionMethod() {
MethodSpec readRegularOptionMethod() {
return readRegularOptionMethod;
}
}

0 comments on commit 4c8431a

Please sign in to comment.