Skip to content

Commit 495ac13

Browse files
authored
Fix for 5_0_x branch. (#1281)
Closes #1280. Co-authored-by: mikereiche <[email protected]>
1 parent 73eb49d commit 495ac13

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/org/springframework/data/couchbase/core/mapping/event/ValidatingCouchbaseEventListener.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors
2+
* Copyright 2012-2021 the original author or authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,10 +16,11 @@
1616

1717
package org.springframework.data.couchbase.core.mapping.event;
1818

19-
import java.util.Set;
19+
import jakarta.validation.ConstraintViolationException;
20+
import jakarta.validation.Validator;
2021

22+
import java.util.Set;
2123

22-
import jakarta.validation.ConstraintViolationException;
2324
import org.slf4j.Logger;
2425
import org.slf4j.LoggerFactory;
2526
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
@@ -33,19 +34,20 @@
3334
* @author Maciej Walkowiak
3435
* @author Michael Nitschinger
3536
* @author Mark Paluch
37+
* @author Michael Reiche
3638
*/
3739
public class ValidatingCouchbaseEventListener extends AbstractCouchbaseEventListener<Object> {
3840

3941
private static final Logger LOG = LoggerFactory.getLogger(ValidatingCouchbaseEventListener.class);
4042

41-
private final LocalValidatorFactoryBean validator;
43+
private final Validator validator;
4244

4345
/**
4446
* Creates a new {@link ValidatingCouchbaseEventListener} using the given {@link Validator}.
4547
*
4648
* @param validator must not be {@literal null}.
4749
*/
48-
public ValidatingCouchbaseEventListener(LocalValidatorFactoryBean validator) {
50+
public ValidatingCouchbaseEventListener(Validator validator) {
4951
Assert.notNull(validator, "Validator must not be null!");
5052
this.validator = validator;
5153
}

0 commit comments

Comments
 (0)