You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mb...@apache.org on 2023/03/04 18:43:35 UTC
[db-jdo] branch main updated: JDO-823: Add a private constructor to hide the implicit public one for utility class
This is an automated email from the ASF dual-hosted git repository.
mbo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/db-jdo.git
The following commit(s) were added to refs/heads/main by this push:
new ac45fe24 JDO-823: Add a private constructor to hide the implicit public one for utility class
ac45fe24 is described below
commit ac45fe24b8173447e0757a4bfdcc8b250bfd050e
Author: Michael Bouschen <Mi...@akquinet.de>
AuthorDate: Sat Mar 4 19:19:26 2023 +0100
JDO-823: Add a private constructor to hide the implicit public one for utility class
---
api/src/main/java/javax/jdo/LegacyJava.java | 5 +++++
exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/api/src/main/java/javax/jdo/LegacyJava.java b/api/src/main/java/javax/jdo/LegacyJava.java
index 983b9846..a708acbd 100644
--- a/api/src/main/java/javax/jdo/LegacyJava.java
+++ b/api/src/main/java/javax/jdo/LegacyJava.java
@@ -51,6 +51,11 @@ public class LegacyJava {
IS_SECURITY_DEPRECATED ? null : findMethod("java.lang.System", "getSecurityManager");
private static final SecurityManager securityManager =
getSecurityManager == null ? null : new SecurityManager();
+
+ private LegacyJava() {
+ // This method is deliberately left empty.
+ }
+
public static final Method doPrivilegedAction =
findMethod(
"java.security.AccessController",
diff --git a/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java b/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
index dcb63aa0..b94af740 100644
--- a/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
+++ b/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
@@ -25,6 +25,10 @@ import java.util.logging.Logger;
/** Helper class that sets properties required for running the JDO TCK. */
public class PropertyUtils {
+ private PropertyUtils() {
+ // This method is deliberately left empty.
+ }
+
/**
* Separates white space separated items from a String into Collection entries Used to collect
* command line argument lists into a Collection