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/19 19:44:15 UTC

[db-jdo] 02/02: JDO-823: String literals should not be duplicated

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

commit f3ebe4a37553c63c04e37b1b2bcdefaceb93c515
Author: Michael Bouschen <Mi...@akquinet.de>
AuthorDate: Sun Mar 19 20:44:06 2023 +0100

    JDO-823: String literals should not be duplicated
---
 api/src/main/java/javax/jdo/JDOHelper.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/api/src/main/java/javax/jdo/JDOHelper.java b/api/src/main/java/javax/jdo/JDOHelper.java
index 7460e5d7..6e59a7e3 100644
--- a/api/src/main/java/javax/jdo/JDOHelper.java
+++ b/api/src/main/java/javax/jdo/JDOHelper.java
@@ -89,6 +89,8 @@ public class JDOHelper implements Constants {
 
   private static final String EXC_GET_PMF_IOEXCEPTION_RSRC = "EXC_GetPMFIOExceptionRsrc"; // NOI18N
 
+  private static final String EXC_GET_PMF_UNEXPECTED_EXCEPTION = "EXC_GetPMFUnexpectedException"; // NOI18N
+
   /**
    * Creates a map from jdoconfig.xsd element attributes to PMF properties.
    *
@@ -1047,7 +1049,7 @@ public class JDOHelper implements Constants {
           throw (JDOException) nested;
         } else
           throw new JDOFatalInternalException(
-              MSG.msg("EXC_GetPMFUnexpectedException"), ite); // NOI18N
+              MSG.msg(EXC_GET_PMF_UNEXPECTED_EXCEPTION), ite);
       }
     } else {
       // overrides is null; use getPersistenceManagerFactory(Map props)
@@ -1085,7 +1087,7 @@ public class JDOHelper implements Constants {
           throw (JDOException) nested;
         } else
           throw new JDOFatalInternalException(
-              MSG.msg("EXC_GetPMFUnexpectedException"), ite); // NOI18N
+              MSG.msg(EXC_GET_PMF_UNEXPECTED_EXCEPTION), ite);
       }
     }
   }
@@ -1729,7 +1731,7 @@ public class JDOHelper implements Constants {
       } else if (cause instanceof InvocationTargetException) {
         throw (InvocationTargetException) cause;
       } else {
-        throw new JDOFatalInternalException(MSG.msg("EXC_GetPMFUnexpectedException"), cause);
+        throw new JDOFatalInternalException(MSG.msg(EXC_GET_PMF_UNEXPECTED_EXCEPTION), cause);
       }
     }
   }