Skip to content

Commit 858b4a5

Browse files
authored
chore: review
1 parent 7f7511d commit 858b4a5

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/br/com/fluentvalidator/AbstractValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import br.com.fluentvalidator.builder.RuleBuilderCollection;
2828
import br.com.fluentvalidator.builder.RuleBuilderProperty;
2929
import br.com.fluentvalidator.context.ProcessorContext;
30-
import br.com.fluentvalidator.context.ValidationContext;
30+
import br.com.fluentvalidator.context.ValidationContext.Context;
3131
import br.com.fluentvalidator.context.ValidationResult;
3232
import br.com.fluentvalidator.rule.Rule;
3333
import br.com.fluentvalidator.rule.RuleBuilderCollectionImpl;
@@ -121,7 +121,7 @@ public <P> P getPropertyOnContext(final String property, final Class<P> clazz) {
121121
*/
122122
@Override
123123
public ValidationResult validate(final T instance) {
124-
try (ValidationContext.Context context = ValidationContext.get()) {
124+
try (final Context context = ValidationContext.get()) {
125125
ruleProcessor.process(instance, this);
126126
return context.getValidationResult();
127127
}

src/main/java/br/com/fluentvalidator/rule/RuleProcessorStrategy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.Collection;
2020
import java.util.stream.Collectors;
2121

22-
import br.com.fluentvalidator.context.ProcessorContext;
22+
import br.com.fluentvalidator.context.ProcessorContext.Context;
2323

2424
public interface RuleProcessorStrategy {
2525

@@ -32,7 +32,7 @@ default <E> boolean process(final E value, final Rule<E> rule) {
3232
}
3333

3434
default <E> boolean process(final Object obj, final Collection<E> values, final Rule<E> rule) {
35-
try(ProcessorContext.Context context = ProcessorContext.get()) {
35+
try (final Context context = ProcessorContext.get()) {
3636
return values.stream().map(value -> {
3737
context.inc();
3838
return this.process(obj, value, rule);
@@ -41,7 +41,7 @@ default <E> boolean process(final Object obj, final Collection<E> values, final
4141
}
4242

4343
default <E> boolean process(final Collection<E> values, final Rule<E> rule) {
44-
try(ProcessorContext.Context context = ProcessorContext.get()) {
44+
try (final Context context = ProcessorContext.get()) {
4545
return values.stream().map(value -> {
4646
context.inc();
4747
return this.process(value, rule);

0 commit comments

Comments
 (0)