From 4ddf63ea3f0ed80c6efa8877201d909900965244 Mon Sep 17 00:00:00 2001
From: Patrick Linskey {@link BrokerFactory} implementation for use with the
* {@link AbstractStoreManager}. This provides integration into the
- * {@link Bootstrap#getBrokerFactory} bootstrapping mechanism, to facilitate
+ * {@link Bootstrap#getBrokerFactory()} bootstrapping mechanism, to facilitate
* the process of creating a subclass of {@link AbstractStoreManager}. New
* store manager implementations need not extend this class. Instead, set the
* Value type used to represent the {@link BrokerFactory}. This type is
* defined separately so that it can be used both in the global configuration
- * and in {@link OpenJPAHelper} with the same encapsulated configuration.org.apache.openjpa.BrokerFactory
configuration property to
@@ -64,7 +64,7 @@ public class AbstractStoreBrokerFactory
/**
* Factory method for obtaining a possibly-pooled {@link BrokerFactory}
- * from properties. Invoked from {@link Bootstrap#getBrokerFactory}.
+ * from properties. Invoked from {@link Bootstrap#getBrokerFactory()}.
*/
public static AbstractStoreBrokerFactory getInstance
(ConfigurationProvider cp) {
@@ -80,7 +80,7 @@ public class AbstractStoreBrokerFactory
/**
* Factory method for constructing a {@link BrokerFactory}
- * from properties. Invoked from {@link Bootstrap#newBrokerFactory}.
+ * from properties. Invoked from {@link Bootstrap#newBrokerFactory()}.
*/
public static AbstractStoreBrokerFactory newInstance
(ConfigurationProvider cp) {
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
index 18e0831bb..2b3aae194 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
@@ -21,7 +21,8 @@ import org.apache.openjpa.lib.conf.PluginValue;
/**
*
RemoteCommitListener
. This method will take
* care of invalidating entries from remote commits, by delegating to
- * {@link #typesChanged}.
+ * {@link #onTypesChanged}.
*/
public void afterCommit(RemoteCommitEvent event) {
if (_closed)
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
index a8cbf32c9..7a41283d5 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
@@ -426,7 +426,6 @@ public class DataCacheStoreManager
DataCache cache;
DataCachePCData data;
BitSet fields;
- FetchConfiguration fc;
for (Iterator itr = sms.iterator(); itr.hasNext();) {
sm = (OpenJPAStateManager) itr.next();
@@ -449,12 +448,6 @@ public class DataCacheStoreManager
|| sm.getPCState() == PCState.HOLLOW) {
data = cache.get(sm.getObjectId());
if (data != null) {
- // ### fc isn't ever accessed; we should check that
- // ### getFetchConfiguration() doesn't have any side-effects
- // ### and remove this code.
- fc = (load == FORCE_LOAD_ALL) ? null
- : fetchState.getFetchConfiguration();
-
// load unloaded fields
fields = sm.getUnloaded(fetchState);
data.load(sm, fields, fetchState, edata);
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCache.java b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCache.java
index 775d7afac..5c94277e7 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCache.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCache.java
@@ -65,8 +65,9 @@ public interface QueryCache
*
* This method is typically not invoked directly from outside
* the QueryCache
class. Instead, the cache should
- * be updated by invoking {@link #typesChanged}, which will
- * result in all queries that may be invalid being dropped.
null
if
* the key was not previously cached. See {@link Map#remove}
@@ -86,7 +87,7 @@ public interface QueryCache
* causes this data to be ignored when determining whether or not
* the cache is full, effectively increasing the total amount of
* data stored in the cache. This method does not affect the
- * behavior of {@link #remove} or {@link #typesChanged}.
+ * behavior of {@link #remove} or {@link #onTypesChanged}.
*
* @return true
if key
's value was
* pinned into the cache; false
if the
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
index 8f53cb3cd..3d475a78b 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
@@ -43,7 +43,6 @@ import serp.util.Strings;
*/
public class CodeGenerator {
- private OpenJPAConfiguration _conf = null;
private File _dir = null;
private CodeFormat _format = null;
private ClassMetaData _meta = null;
@@ -54,15 +53,13 @@ public class CodeGenerator {
* Constructor. Supply configuration and class to generate code for.
*/
public CodeGenerator(OpenJPAConfiguration conf, Class type) {
- this(conf, new MetaDataRepository(conf).
- getMetaData(type, null, true));
+ this(new MetaDataRepository(conf).getMetaData(type, null, true));
}
/**
* Constructor. Supply configuration and metadata to generate code for.
*/
- public CodeGenerator(OpenJPAConfiguration conf, ClassMetaData meta) {
- _conf = conf;
+ public CodeGenerator(ClassMetaData meta) {
_meta = meta;
_type = meta.getDescribedType();
}
@@ -302,7 +299,7 @@ public class CodeGenerator {
private void appendFieldCode(FieldMetaData fmd, CodeFormat decs,
CodeFormat code) {
String fieldName = fmd.getName();
- String capFieldName = StringUtils.capitalise(fieldName);
+ String capFieldName = StringUtils.capitalize(fieldName);
String propertyName = fieldName;
if (propertyName.startsWith("_"))
propertyName = propertyName.substring(1);
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java b/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java
index 6382a2285..51c25daa3 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java
@@ -251,8 +251,6 @@ public class LifecycleEventManager
MetaDataDefaults def = meta.getRepository().getMetaDataFactory().
getDefaults();
- int mode = meta.getRepository().getMetaDataFactory().
- getDefaults().getCallbackMode();
boolean callbacks = def.getCallbacksBeforeListeners(type);
boolean failFast = (def.getCallbackMode() & CALLBACK_FAIL_FAST) != 0;
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java b/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java
index da28abb55..fe9ff6873 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/event/TCPRemoteCommitProvider.java
@@ -170,7 +170,6 @@ public class TCPRemoteCommitProvider
if (cur > numBroadcastThreads) {
// Notify the extra worker threads so they stop themselves
// Threads will not end until they send another pk.
- Iterator iter = _broadcastThreads.iterator();
for (int i = numBroadcastThreads; i < cur; i++) {
BroadcastWorkerThread worker = (BroadcastWorkerThread)
_broadcastThreads.removeFirst();
@@ -434,7 +433,7 @@ public class TCPRemoteCommitProvider
}
/**
- * Threads to broadcast packets placed in the {@link BroadcastQueueu}.
+ * Threads to broadcast packets placed in the {@link BroadcastQueue}.
*/
private class BroadcastWorkerThread
extends Thread {
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
index 4485b3337..d1507109f 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
@@ -135,7 +135,6 @@ public class BrokerImpl
private static final int FLAG_FLUSH_REQUIRED = 2 << 8;
private static final int FLAG_REMOTE_LISTENER = 2 << 9;
private static final int FLAG_RETAINED_CONN = 2 << 10;
- private static final int FLAG_SET_OPERATION = 2 << 11;
private static final Localizer _loc =
Localizer.forPackage(BrokerImpl.class);
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
index 2affc96f7..744584d2b 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
@@ -430,7 +430,6 @@ public class DetachManager
// detach fields and set detached variables
DetachedStateManager detSM = null;
- ClassMetaData meta = sm.getMetaData();
if (_opts.getDetachedStateManager()
&& useDetachedStateManager(sm, _opts))
detSM = new DetachedStateManager(detachedPC, sm, fields,
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
index ec3f2a1b9..e60aec085 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
@@ -67,8 +67,6 @@ public class FetchConfigurationImpl
private Set _rootInstances;
private Map _hints = null;
- private static final String[] EMPTY_STRINGS = new String[0];
-
public StoreContext getContext() {
return _ctx;
}
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchStateImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchStateImpl.java
index 961543d97..5ad63dc34 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchStateImpl.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchStateImpl.java
@@ -177,7 +177,6 @@ public class FetchStateImpl
void traverse(FieldMetaData fm) {
int sourceDepth = getDepth(fm.getDeclaringMetaData());
- int targetDepth = getDepth(fm.getDeclaredTypeMetaData());
int traversalCount = getTraversalCount(fm);
boolean isRecursive = fm.getDeclaringMetaData() ==
fm.getDeclaredTypeMetaData();
@@ -204,42 +203,4 @@ public class FetchStateImpl
return ((Integer) _depths.get(cm)).intValue();
return 0;
}
-
- /**
- * Combination of an instance and its field used as key.
- */
- private static class InstanceFieldKey {
-
- final OpenJPAStateManager _sm;
- final FieldMetaData _fm;
-
- /**
- * Supply configuration.
- *
- * @param sm can be null
- * @param fm must not be null
- */
- public InstanceFieldKey(OpenJPAStateManager sm, FieldMetaData fm) {
- _sm = sm;
- _fm = fm;
- }
-
- public boolean equals(Object other) {
- if (other instanceof InstanceFieldKey) {
- InstanceFieldKey that = (InstanceFieldKey) other;
- return (_sm == that._sm) && (_fm == that._fm);
- }
- return false;
- }
-
- public int hashCode() {
- int smHash = (_sm != null) ? _sm.hashCode() : 0;
- int fmHash = (_fm != null) ? _fm.hashCode() : 0;
- return smHash + fmHash;
- }
-
- public String toString() {
- return _sm + "." + _fm;
- }
- }
}
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java
index 6c0391346..206a53a53 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java
@@ -833,7 +833,7 @@ public class Filters {
if (e instanceof InvocationTargetException)
t = ((InvocationTargetException) e).getTargetException();
throw new UserException(_loc.get("bad-getter-hint",
- target.getClass(), hintKey)).setCause(e);
+ target.getClass(), hintKey)).setCause(t);
}
}
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/OpenJPAStateManager.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/OpenJPAStateManager.java
index 8b37d9380..677cfdea7 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/OpenJPAStateManager.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/OpenJPAStateManager.java
@@ -185,8 +185,7 @@ public interface OpenJPAStateManager
* Return the identifier for this state manager. This may return a
* temporary identifier for new unflushed instances that have not been
* assigned an object id, or for non-persistent or embedded instances.
- * For all other instances this method is the same as
- * {@link StateManager#getObjectId}.
+ * For all other instances this method is the same as {@link #getObjectId}.
*/
public Object getId();
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryContext.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryContext.java
index f5297b9c1..8acde6c54 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryContext.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryContext.java
@@ -139,8 +139,7 @@ public interface QueryContext {
public Class getResultType();
/**
- * Specify the type of object in which the
- * result of invoking {@link #execute} or one of its siblings.
+ * Specify the type of object in which the result of evaluating this query.
*
* @since 3.0
*/
@@ -278,12 +277,12 @@ public interface QueryContext {
/**
* Synchronize on the query's internal lock.
- */
- public void lock ();
+ */
+ public void lock ();
- /**
- * Unlock the query's internal lock.
- */
- public void unlock ();
+ /**
+ * Unlock the query's internal lock.
+ */
+ public void unlock();
}
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
index 4f23cccbc..8f0f807da 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
@@ -1732,7 +1732,6 @@ public class QueryImpl
LinkedMap paramTypes = ex.getParameterTypes(_storeQuery);
if (paramTypes != null && !paramTypes.isEmpty()) {
Map.Entry entry;
- Object param;
for (Iterator itr = paramTypes.entrySet().iterator();
itr.hasNext();) {
entry = (Map.Entry) itr.next();
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryOperations.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryOperations.java
index 485a7c894..b5bd66b98 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryOperations.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryOperations.java
@@ -26,7 +26,7 @@ public interface QueryOperations {
* Symbolic constant that indicates that this query will be
* performing a select operation.
*
- * @see Query#getOperation
+ * @see QueryContext#getOperation
*/
public static final int OP_SELECT = 1;
@@ -34,7 +34,7 @@ public interface QueryOperations {
* Symbolic constant that indicates that this query will be
* performing a delete operation.
*
- * @see Query#getOperation
+ * @see QueryContext#getOperation
*/
public static final int OP_DELETE = 2;
@@ -42,7 +42,7 @@ public interface QueryOperations {
* Symbolic constant that indicates that this query will be
* performing a update operation.
*
- * @see Query#getOperation
+ * @see QueryContext#getOperation
*/
public static final int OP_UPDATE = 3;
}
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreManager.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreManager.java
index 4fa2830af..7ddc41dbe 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreManager.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreManager.java
@@ -116,7 +116,8 @@ public interface StoreManager
* Initialization involves first calling the
* {@link OpenJPAStateManager#initialize} method with
* a new instance of the correct type constructed with the
- * {@link PCRegistry#newInstance(Class,StateManager,Object)} method
+ * {@link org.apache.openjpa.enhance.PCRegistry#newInstance(Class,
+ * org.apache.openjpa.enhance.StateManager, boolean)} method
* (this will reset the state manager's metadata if the actual type was a
* subclass). After instance initialization, load any the fields for the
* given fetch configuration that can be efficiently retrieved. If any of
@@ -169,7 +170,7 @@ public interface StoreManager
/**
* Initialize, load, or validate the existance of all of the given
* objects. This method is called from various broker methods that act
- * on multiple objects, such as {@link Broker#findAll}. It gives
+ * on multiple objects, such as {@link StoreContext#retrieveAll}. It gives
* the store manager an opportunity to efficiently batch-load data for
* several objects. Each of the given state managers will be in one of
* three states, each requiring a different action:
@@ -240,7 +241,7 @@ public interface StoreManager
* The current version will roll over to this next version upon successful
* commit.
*
- * @see org.apache.openjpa.util.ApplicationIds#assign
+ * @see org.apache.openjpa.util.ApplicationIds#assign()
*/
public Collection flush(Collection sms);
@@ -260,7 +261,7 @@ public interface StoreManager
* {@link #flush}
* @see org.apache.openjpa.util.ImplHelper#generateFieldValue
* @see org.apache.openjpa.util.ImplHelper#generateIdentityValue
- * @see org.apache.openjpa.util.ApplicationIds#assign
+ * @see org.apache.openjpa.util.ApplicationIds#assign()
* @since 3.3
*/
public boolean assignObjectId(OpenJPAStateManager sm, boolean preFlush);
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Concat.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Concat.java
index 4707ec898..1d84c4b5e 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Concat.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Concat.java
@@ -58,7 +58,6 @@ class Concat
StringBuffer cat = new StringBuffer(str.toString());
Object arg = _args.eval(candidate, orig, ctx, params);
- int idx;
if (arg instanceof Object[]) {
for (int i = 0; i < ((Object[]) arg).length; i++)
cat.append((((Object[]) arg)[i]).toString());
diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Distinct.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Distinct.java
index eda29b2cb..9376c6e84 100755
--- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Distinct.java
+++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Distinct.java
@@ -20,7 +20,6 @@ import java.util.Collections;
import java.util.HashSet;
import org.apache.openjpa.kernel.StoreContext;
-import org.apache.openjpa.lib.util.Localizer;
/**
* A distinct set of the specified values.
@@ -30,9 +29,6 @@ import org.apache.openjpa.lib.util.Localizer; class Distinct extends Val { - private static final Localizer _loc = Localizer.forPackage - (AggregateVal.class); - private final Val _val; /** @@ -61,7 +57,8 @@ class Distinct StoreContext ctx, Object[] params) { if (candidate == null) candidate = Collections.EMPTY_LIST; - + + // ### should arg be used in eval below? Collection arg = candidate instanceof Collection ? (Collection) candidate : Collections.singleton(candidate); diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/MatchesExpression.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/MatchesExpression.java index 846da35f7..1ee318fd9 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/MatchesExpression.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/MatchesExpression.java @@ -28,7 +28,7 @@ class MatchesExpression private final String _single; private final String _multi; - private final String _escape; + private final String _escape; // ### in-memory queries are not using escapes private final boolean _affirmation; /** diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/UnboundVariable.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/UnboundVariable.java index 914d2cc2e..f47561c46 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/UnboundVariable.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/UnboundVariable.java @@ -16,7 +16,6 @@ package org.apache.openjpa.kernel.exps; import org.apache.openjpa.kernel.StoreContext; -import org.apache.openjpa.lib.util.Localizer; /** *Represents an unbound variable. When the query is evaluated, @@ -28,9 +27,6 @@ import org.apache.openjpa.lib.util.Localizer; class UnboundVariable extends Val { - private static final Localizer _loc = Localizer.forPackage - (UnboundVariable.class); - private Class _type = null; private Object _val = null; diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java index 86c553cce..c048b2e29 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java @@ -34,10 +34,8 @@ import org.apache.openjpa.kernel.ExpressionStoreQuery; import org.apache.openjpa.kernel.QueryContext; import org.apache.openjpa.kernel.QueryOperations; import org.apache.openjpa.kernel.exps.AbstractExpressionBuilder; -import org.apache.openjpa.kernel.exps.AggregateListener; import org.apache.openjpa.kernel.exps.Expression; import org.apache.openjpa.kernel.exps.ExpressionFactory; -import org.apache.openjpa.kernel.exps.FilterListener; import org.apache.openjpa.kernel.exps.Literal; import org.apache.openjpa.kernel.exps.Parameter; import org.apache.openjpa.kernel.exps.Path; @@ -66,14 +64,12 @@ class JPQLExpressionBuilder extends AbstractExpressionBuilder implements JPQLTreeConstants { - private static final int VAR_OK = 0; private static final int VAR_PATH = 1; private static final int VAR_ERROR = 2; private static Localizer _loc = Localizer.forPackage (JPQLExpressionBuilder.class); - private final ExpressionStoreQuery query; private final Stack contexts = new Stack(); private LinkedMap parameterTypes; private int aliasCount = 0; @@ -90,7 +86,6 @@ class JPQLExpressionBuilder ExpressionStoreQuery query, Object parsedQuery) { super(factory, query.getResolver()); - this.query = query; contexts.push(new Context(parsedQuery instanceof ParsedJPQL ? (ParsedJPQL) parsedQuery : parsedQuery instanceof String @@ -261,10 +256,6 @@ class JPQLExpressionBuilder return e1 == null ? e2 : e2 == null ? e1 : factory.and(e1, e2); } - private Expression or(Expression e1, Expression e2) { - return e1 == null ? e2 : e2 == null ? e1 : factory.or(e1, e2); - } - private static String assemble(JPQLNode node) { return assemble(node, ".", 0); } @@ -453,7 +444,6 @@ class JPQLExpressionBuilder protected void evalSetClause(QueryExpressions exps) { // handle SET field = value - Set joins = null; JPQLNode[] nodes = root().findChildrenByID(JJTUPDATEITEM); Map updates = null; @@ -687,10 +677,6 @@ class JPQLExpressionBuilder * Recursive helper method to evaluate the given node. */ private Object eval(JPQLNode node) { - Expression exp1, exp2; - FilterListener listener; - AggregateListener agg; - Path path; Value val1 = null; Value val2 = null; Value val3 = null; diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java index e14b06062..2cc6ff99b 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java @@ -29,7 +29,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.SortedSet; import java.util.TreeMap; import org.apache.commons.lang.StringUtils; @@ -147,7 +146,6 @@ public class ClassMetaData private String _seqName = DEFAULT_STRING; private SequenceMetaData _seqMeta = null; private Map _fgs = new HashMap(); - private SortedSet _lgSet = null; private String _cacheName = DEFAULT_STRING; private int _cacheTimeout = Integer.MIN_VALUE; private Boolean _detachable = null; diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataDefaults.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataDefaults.java index 7c5e09ff8..8a3c1db23 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataDefaults.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataDefaults.java @@ -29,7 +29,7 @@ public interface MetaDataDefaults /** * Return the default access type for base persistent class with - * {@link ClassMetaData.ACCESS_UNKNOWN} access type. + * {@link ClassMetaData#ACCESS_UNKNOWN} access type. */ public int getDefaultAccessType(); diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractChangeTracker.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractChangeTracker.java index 3efa838de..be238a4fb 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractChangeTracker.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractChangeTracker.java @@ -22,7 +22,6 @@ import java.util.Set; import org.apache.commons.collections.map.IdentityMap; import org.apache.commons.collections.set.MapBackedSet; -import org.apache.openjpa.conf.OpenJPAConfiguration; /** *
Base class that provides utilities to change trackers.
@@ -48,10 +47,6 @@ public abstract class AbstractChangeTracker */ protected Collection change = null; - // we need the configuration for context when figuring out if a type - // is managed - private final OpenJPAConfiguration _conf; - private boolean _autoOff = true; private boolean _track = false; private Boolean _identity = null; @@ -60,8 +55,7 @@ public abstract class AbstractChangeTracker /** * Constructor; supply configuration. */ - public AbstractChangeTracker(OpenJPAConfiguration conf) { - _conf = conf; + public AbstractChangeTracker() { } /** diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java index 10d09e85c..d41088c0b 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java @@ -44,7 +44,6 @@ public class CollectionChangeTrackerImpl */ public CollectionChangeTrackerImpl(Collection coll, boolean dups, boolean order, OpenJPAConfiguration conf) { - super(conf); _coll = coll; _dups = dups; _order = order; diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java index f69a76450..94e0ee4dc 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java @@ -24,7 +24,6 @@ import java.util.Iterator; import org.apache.commons.lang.StringUtils; import org.apache.openjpa.conf.OpenJPAConfiguration; import org.apache.openjpa.enhance.PersistenceCapable; -import org.apache.openjpa.kernel.FetchConfiguration; import org.apache.openjpa.kernel.FetchState; import org.apache.openjpa.kernel.LockManager; import org.apache.openjpa.kernel.OpenJPAStateManager; @@ -100,7 +99,6 @@ public class ImplHelper { PCState state, int load, FetchState fetchState, Object context) { Collection failed = null; OpenJPAStateManager sm; - FetchConfiguration fc; LockManager lm; for (Iterator itr = sms.iterator(); itr.hasNext();) { sm = (OpenJPAStateManager) itr.next(); @@ -109,8 +107,6 @@ public class ImplHelper { failed = addFailedId(sm, failed); } else if (load != StoreManager.FORCE_LOAD_NONE || sm.getPCState() == PCState.HOLLOW) { - fc = (load == StoreManager.FORCE_LOAD_ALL) ? null - : fetchState.getFetchConfiguration(); lm = sm.getContext().getLockManager(); if (!store.load(sm, sm.getUnloaded(fetchState), diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTracker.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTracker.java index eee59f982..32b41f503 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTracker.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTracker.java @@ -18,9 +18,9 @@ package org.apache.openjpa.util; /** *Change tracker that can be used for maps. If the user calls * any mutating methods on the map that do not have an equivalent in - * this change tracker, then you must call {@link #stopTracking} after - * applying the operation to the map. The collections returned from - * {@link ChangeTracker#getAdd} and {@link ChangeTracker#getRemove} will + * this change tracker, then you must call {@link ChangeTracker#stopTracking} + * after applying the operation to the map. The collections returned from + * {@link ChangeTracker#getAdded} and {@link ChangeTracker#getRemoved} will * be collections of keys to add/remove.
* * @author Abe White diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java index 13000086a..7c8081c02 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java @@ -36,7 +36,6 @@ public class MapChangeTrackerImpl * Constructor; supply delegate map. */ public MapChangeTrackerImpl(Map map, OpenJPAConfiguration conf) { - super(conf); _map = map; } diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ObjectId.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ObjectId.java index 84e7782c6..1a6812e8d 100755 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ObjectId.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ObjectId.java @@ -15,8 +15,6 @@ */ package org.apache.openjpa.util; -import org.apache.openjpa.lib.util.Localizer; - /** *Identity type appropriate for object primary key fields and shared * id classes.
@@ -26,8 +24,6 @@ import org.apache.openjpa.lib.util.Localizer; public final class ObjectId extends OpenJPAId { - private static final Localizer _loc = Localizer.forPackage(ObjectId.class); - private Object _key; public ObjectId(Class cls, Object key) { diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java index 4f518feee..34879e36e 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java @@ -16,8 +16,6 @@ import java.lang.reflect.Array; import java.util.ArrayList; import java.util.List; -import org.apache.openjpa.lib.util.Localizer; - /** * A list of plugins. Defaults and aliases on plugin lists apply only * to individual class names. @@ -29,9 +27,6 @@ public class PluginListValue extends ObjectValue { private static final String[] EMPTY = new String[0]; - private static final Localizer _loc = Localizer.forPackage - (PluginListValue.class); - private String[] _names = EMPTY; private String[] _props = EMPTY; diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java index a200707e8..7394cbd1f 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java @@ -95,7 +95,7 @@ public class LoggingConnectionDecorator implements ConnectionDecorator { } /** - * @see {@link #setPrettyPrint} + * @see #setPrettyPrint */ public boolean getPrettyPrint() { return _prettyPrint; @@ -114,7 +114,7 @@ public class LoggingConnectionDecorator implements ConnectionDecorator { } /** - * @see {@link #setPrettyPrintLineLength} + * @see #setPrettyPrintLineLength */ public int getPrettyPrintLineLength() { return _prettyPrintLineLength; @@ -190,17 +190,6 @@ public class LoggingConnectionDecorator implements ConnectionDecorator { return new ReportingSQLException(sqle, sql); } - private static String getExceptionMessage(SQLException sqle, - Statement stmnt) { - try { - return sqle.getMessage() + " {" + stmnt + "} " - + "[code=" + sqle.getErrorCode() + ", state=" - + sqle.getSQLState() + "]"; - } catch (Throwable t) { - return sqle.getMessage(); - } - } - /** * Interface that allows customization of what to do when * {@link SQLWarning}s occur. diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java index f3039308d..778009023 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java @@ -19,7 +19,6 @@ import java.util.Map; import org.apache.commons.collections.map.LinkedMap; import org.xml.sax.SAXException; -import org.apache.openjpa.lib.util.Localizer; /** * Helps serialize metadata objects to package and class elements. @@ -30,9 +29,6 @@ import org.apache.openjpa.lib.util.Localizer; */ public abstract class CFMetaDataSerializer extends XMLMetaDataSerializer { - private static final Localizer _loc = Localizer.forPackage - (CFMetaDataSerializer.class); - private String _package = null; /** diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassMetaDataIterator.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassMetaDataIterator.java index fa4ee8952..6d6a4fd05 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassMetaDataIterator.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassMetaDataIterator.java @@ -41,7 +41,6 @@ public class ClassMetaDataIterator implements MetaDataIterator { private int _loc = -1; private final List _urls = new ArrayList(3); private int _url = -1; - private URL _last = null; /** * Constructor; supply the class whose metadata to find, the suffix diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/MetaDataSerializer.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/MetaDataSerializer.java index 165e7f704..1fa561099 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/MetaDataSerializer.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/MetaDataSerializer.java @@ -36,7 +36,7 @@ public interface MetaDataSerializer { * not be included in the output. * * @param flags bit flags specifying the output flags; e.g. - * {@link PRETTY #PRETTY} + * {@link #PRETTY} */ public void serialize(int flags) throws IOException; @@ -49,7 +49,7 @@ public interface MetaDataSerializer { * keys that are the {@link File} instances, and * values that are the {@link String} contents of the metadata * @param flags bit flags specifying the output flags; e.g. - * {@link PRETTY #PRETTY} + * {@link #PRETTY} */ public void serialize(Map output, int flags) throws IOException; @@ -57,7 +57,7 @@ public interface MetaDataSerializer { * Serialize the current set of objects to the given file. * * @param flags bit flags specifying the output flags; e.g. - * {@link PRETTY #PRETTY} | {@link APPEND #APPEND} + * {@link #PRETTY} | {@link #APPEND} */ public void serialize(File file, int flags) throws IOException; @@ -65,7 +65,7 @@ public interface MetaDataSerializer { * Serialize the current set of objects to the given stream. * * @param flags bit flags specifying the output flags; e.g. - * {@link PRETTY #PRETTY} + * {@link #PRETTY} */ public void serialize(Writer out, int flags) throws IOException; } diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java index dcb87d6e4..8c4aa9449 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java @@ -399,18 +399,6 @@ public abstract class XMLMetaDataParser extends DefaultHandler return !added; } - /** - * Whether we previously parsed the given file. - */ - private boolean parsed(File file, String cur) throws IOException { - if (file == null) - return false; - String src = file.getCanonicalFile().toURL().toString(); - if (src.equals(cur)) - return false; - return parsed(src); - } - public void clear() { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("clear-parser", this)); diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java index 9a4c68ea4..e92c3d9ee 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java @@ -425,7 +425,6 @@ public class FormatPreservingProperties extends Properties { public void store(OutputStream out, String header) throws IOException { boolean endWithNewline = source != null && source.endsInNewline; - boolean firstLine = true; // Must be ISO-8859-1 ecoding according to Properties.load javadoc PrintWriter writer = new PrintWriter diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java index dbfae7170..08b44ffb0 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Options.java @@ -294,7 +294,7 @@ public class Options extends TypedProperties { // setter with more than 1 arg is ignored; calc setter and getter // name to look for String[] find = Strings.split(key, ".", 2); - String base = StringUtils.capitalise(find[0]); + String base = StringUtils.capitalize(find[0]); String set = "set" + base; String get = "get" + base; @@ -331,7 +331,7 @@ public class Options extends TypedProperties { Member getter = getMeth; if (setter == null) { Field[] fields = type.getFields(); - String uncapBase = StringUtils.uncapitalise(find[0]); + String uncapBase = StringUtils.uncapitalize(find[0]); for (int i = 0; i < fields.length; i++) { if (fields[i].getName().equals(base) || fields[i].getName().equals(uncapBase)) { diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java index 34a46b34c..f1eda0e44 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ZipResourceBundleProvider.java @@ -40,7 +40,6 @@ class ZipResourceBundleProvider implements ResourceBundleProvider { return null; ZipInputStream zip = new ZipInputStream(in); - ResourceBundle bundle = null; try { ZipEntry ze; while (true) { diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ConcurrentHashMap.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ConcurrentHashMap.java index 4f6d45f91..a5e232c20 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ConcurrentHashMap.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/ConcurrentHashMap.java @@ -920,7 +920,9 @@ public class ConcurrentHashMap extends AbstractMap // Read in size(number of Mappings) int size = s.readInt(); - int maxSize = s.readInt(); + + // read the max size + maxSize = s.readInt(); // Read the keys and values, and put the mappings in the // ConcurrentHashMap diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.java index d8062c013..44ebb0efa 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/CopyOnWriteArrayList.java @@ -227,7 +227,6 @@ public class CopyOnWriteArrayList implements List, Cloneable, Serializable { Object[] newarr = new Object[length + ca.length]; int moved = length - index; System.arraycopy(oldarr, 0, newarr, 0, index); - int pos = length; System.arraycopy(ca, 0, newarr, index, ca.length); if (moved > 0) { System diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOWaitQueue.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOWaitQueue.java index bbf13b608..51a3e7bed 100755 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOWaitQueue.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/concurrent/FIFOWaitQueue.java @@ -73,7 +73,6 @@ class FIFOWaitQueue extends WaitQueue implements java.io.Serializable { public Collection getWaitingThreads() { List list = new ArrayList(); - int count = 0; WaitNode node = head_; while (node != null) { if (node.waiting) list.add(node.owner); 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 cc0d424e9..c288f4c6e 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 @@ -26,8 +26,7 @@ import org.apache.openjpa.lib.conf.Value; import org.apache.openjpa.lib.test.AbstractTestCase; /** - * Tests the {@link ConfigurationImpl} type, and in so doing tests - * the {@link AbstractConfiguration} as well. This needs to be placed + * Tests the {@link ConfigurationImpl} type. This needs to be placed * in a sub-package so that it can have its own localizer.properties * properties, which are required for the bean descriptors used by the * configuration framework {@link Value}. diff --git a/openjpa-lib/src/test/java/org/apache/openjpa/lib/test/AbstractTestCase.java b/openjpa-lib/src/test/java/org/apache/openjpa/lib/test/AbstractTestCase.java index a676cc5c0..9007068e1 100755 --- a/openjpa-lib/src/test/java/org/apache/openjpa/lib/test/AbstractTestCase.java +++ b/openjpa-lib/src/test/java/org/apache/openjpa/lib/test/AbstractTestCase.java @@ -480,7 +480,7 @@ public abstract class AbstractTestCase extends TestCase { /** * Execute a test method in multiple threads. * - * @param thread the number of Threads to run in + * @param threads the number of Threads to run in * @param iterations the number of times the method should * be execute in a single Thread * @param method the name of the method to execute @@ -782,7 +782,7 @@ public abstract class AbstractTestCase extends TestCase { } /** - * @see timeout(long) + * @see #timeout(long) */ public boolean timeout(long millis, String methodName) throws Throwable { // we are in the timing out-thread: do nothing so the @@ -1382,13 +1382,6 @@ public abstract class AbstractTestCase extends TestCase { } } - private static String trim(String str, int max) { - if (str.length() < max) - return str; - - return str.substring(0, max) + "..."; - } - /** * To be called by the child. E.g.: * public static void main(String [] args) { main(TestBug375.class);
diff --git a/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestReferenceSet.java b/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestReferenceSet.java
index b72a8282c..80e0c82ff 100755
--- a/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestReferenceSet.java
+++ b/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestReferenceSet.java
@@ -112,18 +112,4 @@ public class TestReferenceSet extends TestCase {
_coll.add("foo");
assertTrue(_coll.contains(held));
}
-
- /**
- * Used to test inherited functionality.
- */
- private static final class Node {
-
- public int hashCode() {
- return 1;
- }
-
- public boolean equals(Object other) {
- return true;
- }
- }
}
diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
index af5bdabd2..52599f99a 100755
--- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
+++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
@@ -870,7 +870,6 @@ public class AnnotationPersistenceMetaDataParser
* Create fetch groups.
*/
private void parseFetchGroups(ClassMetaData meta, FetchGroup... groups) {
- MetaDataRepository repos = getRepository();
for (FetchGroup group : groups) {
if (StringUtils.isEmpty(group.name()))
throw new MetaDataException(_loc.get("unnamed-fg", meta));
@@ -1483,7 +1482,6 @@ public class AnnotationPersistenceMetaDataParser
*/
private void parseNamedQueries(AnnotatedElement el, NamedQuery... queries) {
QueryMetaData meta;
- QueryHint[] hints;
for (NamedQuery query : queries) {
if (StringUtils.isEmpty(query.name()))
throw new MetaDataException(_loc.get("no-query-name", el));
diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
index 3d12bd55d..57b5ffb37 100755
--- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
+++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
@@ -437,7 +437,7 @@ public interface OpenJPAEntityManager
* Validate the changes made in this transaction, reporting any optimistic
* violations, constraint violations, etc. In a datastore transaction or
* a flushed optimistic transaction, this method will act just like
- * {@link #flush}. In an optimistic transaction that has not yet begun a
+ * {@link #flush()}. In an optimistic transaction that has not yet begun a
* datastore-level transaction, however, it will only report exceptions
* that would occur on flush, without retaining any datastore resources.
*/
diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java
index 99daf86b9..6fa9c6b18 100755
--- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java
+++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java
@@ -1142,13 +1142,6 @@ public class XMLPersistenceMetaDataSerializer
addAttribute("mapped-by", fmd.getMappedBy());
}
- /**
- * Serialize the content of the given value. Does nothing by default.
- */
- private void serializeStrategyMappingContent(FieldMetaData vmd)
- throws SAXException {
- }
-
/**
* Represents ordered set of {@link SequenceMetaData}s with a
* common class scope.
diff --git a/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java b/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java
index 6b6ee667b..76f5006d2 100755
--- a/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java
+++ b/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java
@@ -31,7 +31,6 @@ import org.apache.openjpa.kernel.FetchConfiguration;
import org.apache.openjpa.kernel.FetchState;
import org.apache.openjpa.kernel.OpenJPAStateManager;
import org.apache.openjpa.kernel.PCState;
-import org.apache.openjpa.lib.log.Log;
import org.apache.openjpa.lib.rop.ListResultObjectProvider;
import org.apache.openjpa.lib.rop.ResultObjectProvider;
import org.apache.openjpa.meta.ClassMetaData;
@@ -52,7 +51,6 @@ public class XMLStoreManager
private XMLConfiguration _conf;
private XMLStore _store;
- private Log _log;
// changed data within the current transaction
private Collection _updates;
@@ -81,7 +79,6 @@ public class XMLStoreManager
// cache operational state
_conf = (XMLConfiguration) ctx.getConfiguration();
_store = _conf.getStore();
- _log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
}
public boolean exists(OpenJPAStateManager sm, Object context) {