From e889cd2aefeed17de3b84a58c586e3a44e5feacf Mon Sep 17 00:00:00 2001 From: Patrick Linskey Date: Tue, 1 Aug 2006 07:05:08 +0000 Subject: [PATCH] cleaned up some imports; fixed a typo; changed test case to reduce output git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@427472 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/enhance/PCDataGenerator.java | 1 - .../apache/openjpa/kernel/StateManagerImpl.java | 15 +-------------- .../openjpa/lib/jdbc/DelegatingStatement.java | 3 +-- .../org/apache/openjpa/lib/xml/XMLFactory.java | 2 -- .../lib/conf/test/TestConfigurationImpl.java | 8 +++++++- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java index fcba46492..07fc772e3 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCDataGenerator.java @@ -20,7 +20,6 @@ import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; -import java.util.Set; import org.apache.commons.lang.StringUtils; import org.apache.openjpa.conf.OpenJPAConfiguration; diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java index dd4e348e8..28f6374ca 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java @@ -2793,20 +2793,7 @@ public class StateManagerImpl } /** - * Return whether the second field has any custom fetch groups in common - * with the first. - */ - private static boolean sharesCustomFetchGroups(FieldMetaData fmd1, - FieldMetaData fmd2) { - String[] fgs = fmd1.getCustomFetchGroups(); - for (int i = 0; i < fgs.length; i++) - if (fmd2.isInFetchGroup(fgs[i])) - return true; - return false; - } - - /** - * Helper method to privde the given field number to the given + * Helper method to provide the given field number to the given * field manager. */ void provideField(PersistenceCapable pc, FieldManager store, int field) { diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java index bf2c03569..54329f99c 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java @@ -266,5 +266,4 @@ public class DelegatingStatement implements Statement, Closeable { public int getResultSetHoldability() throws SQLException { throw new UnsupportedOperationException(); } -} - +} \ No newline at end of file diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java index a9212e560..9aad4e94f 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java @@ -20,7 +20,6 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.sax.SAXTransformerFactory; import org.apache.commons.lang.exception.NestableRuntimeException; import org.w3c.dom.Document; @@ -42,7 +41,6 @@ public class XMLFactory { // cache parsers and transformers in all possible configurations private static SAXParserFactory[] _saxFactories = null; private static DocumentBuilderFactory[] _domFactories = null; - private static SAXTransformerFactory _transFactory = null; private static ErrorHandler _validating; static { diff --git a/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestConfigurationImpl.java b/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestConfigurationImpl.java index 5033413f4..043c30c10 100644 --- a/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestConfigurationImpl.java +++ b/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestConfigurationImpl.java @@ -36,7 +36,6 @@ import org.apache.openjpa.lib.test.AbstractTestCase; public class TestConfigurationImpl extends AbstractTestCase { private ConfigurationTest _conf = new ConfigurationTest(); - private String _def; public TestConfigurationImpl(String test) { super(test); @@ -308,5 +307,12 @@ public class TestConfigurationImpl extends AbstractTestCase { public void deriveObjectKey(Object val) { _objectKey.set(val, true); } + + protected boolean isInvalidProperty(String s) { + if ("openjpatest.properties".equals(s)) + return false; + else + return super.isInvalidProperty(s); + } } }