Skip to content

Commit b6e3d98

Browse files
authored
Make Utils Class constructor private to enforce noninstantiability (#3266)
- Changed constructor to private to prevent instantiation
1 parent 5f7f915 commit b6e3d98

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/main/java/io/lettuce/core/internal/LettuceClassUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
public class LettuceClassUtils {
1313

14+
private LettuceClassUtils() {
15+
// No Instances.
16+
}
17+
1418
/** The CGLIB class separator character "$$" */
1519
public static final String CGLIB_CLASS_SEPARATOR = "$$";
1620

src/main/java/io/lettuce/core/masterreplica/ReplicaUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
class ReplicaUtils {
1313

14+
private ReplicaUtils() {
15+
// No Instances.
16+
}
17+
1418
/**
1519
* Check if properties changed.
1620
*

src/test/java/io/lettuce/test/ReflectionTestUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
*/
1212
public final class ReflectionTestUtils {
1313

14+
private ReflectionTestUtils() {
15+
// No Instances.
16+
}
17+
1418
/**
1519
* Get the value of the {@linkplain Field field} with the given {@code name} from the provided {@code targetObject}.
1620
* <p>

0 commit comments

Comments
 (0)