Skip to content

Commit

Permalink
remove static references
Browse files Browse the repository at this point in the history
  • Loading branch information
PayalKhanna committed Jan 23, 2024
1 parent d082408 commit 9976582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static ExpressionDataRuleResult fromDataRule(ValidationResult result, String ope
Type.DataRule,
null,
Optional.ofNullable(operator),
ValidationResult.isSuccess(),
result.isSuccess(),
result.getFailureReason().orElse(""));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
import java.util.Optional;

public class ValidationResult{
private static boolean success;
private boolean success;
private Optional<String> failureReason;
private RosettaPath path;
private Optional<ValidationData> data;

@SuppressWarnings("static-access")
public ValidationResult(boolean success, String failureReason, RosettaPath path, ValidationData data) {
this.success = success;
this.failureReason = failureReason!=""?Optional.ofNullable(failureReason):Optional.empty();
Expand All @@ -26,7 +25,7 @@ public static ValidationResult failure(RosettaPath path, String failureReason, V
return new ValidationResult(false, failureReason, path, data);
}

public static boolean isSuccess() {
public boolean isSuccess() {
return success;
}

Expand Down

0 comments on commit 9976582

Please sign in to comment.