Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mplushnikov committed Oct 1, 2018
1 parent e85defa commit ba79181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -180,7 +180,7 @@ private boolean validateAnnotationOnRightType(@NotNull PsiClass psiClass, @NotNu


private boolean validateObtainViaAnnotations(Stream<BuilderInfo> builderInfos, @NotNull ProblemBuilder problemBuilder) { private boolean validateObtainViaAnnotations(Stream<BuilderInfo> builderInfos, @NotNull ProblemBuilder problemBuilder) {
AtomicBoolean result = new AtomicBoolean(true); AtomicBoolean result = new AtomicBoolean(true);
builderInfos.map(BuilderInfo::withObtainVia).filter(BuilderInfo::hasObtainVaiAnnotatation).forEach(builderInfo -> builderInfos.map(BuilderInfo::withObtainVia).filter(BuilderInfo::hasObtainViaAnnotation).forEach(builderInfo ->
{ {
if (StringUtil.isEmpty(builderInfo.getViaFieldName()) == StringUtil.isEmpty(builderInfo.getViaMethodName())) { if (StringUtil.isEmpty(builderInfo.getViaFieldName()) == StringUtil.isEmpty(builderInfo.getViaMethodName())) {
problemBuilder.addError("The syntax is either @ObtainVia(field = \"fieldName\") or @ObtainVia(method = \"methodName\")."); problemBuilder.addError("The syntax is either @ObtainVia(field = \"fieldName\") or @ObtainVia(method = \"methodName\").");
Expand Down
Expand Up @@ -200,7 +200,7 @@ public boolean hasSingularAnnotation() {
return null != singularAnnotation; return null != singularAnnotation;
} }


public boolean hasObtainVaiAnnotatation() { public boolean hasObtainViaAnnotation() {
return null != obtainViaAnnotation; return null != obtainViaAnnotation;
} }


Expand Down Expand Up @@ -244,7 +244,7 @@ public CharSequence renderToBuilderCall() {


result.append(fieldInBuilderName); result.append(fieldInBuilderName);
result.append('('); result.append('(');
if (hasObtainVaiAnnotatation()) { if (hasObtainViaAnnotation()) {
if (StringUtil.isNotEmpty(viaFieldName)) { if (StringUtil.isNotEmpty(viaFieldName)) {
result.append("this."); result.append("this.");
result.append(viaFieldName); result.append(viaFieldName);
Expand Down

0 comments on commit ba79181

Please sign in to comment.