Author: mrisaliti
Date: Fri Mar 4 23:22:13 2011
New Revision: 1078214
URL:
http://svn.apache.org/viewvc?rev=1078214&view=revLog:
Remove some warning in GenericDelegator (OFBIZ-4102)
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1078214&r1=1078213&r2=1078214&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Fri Mar 4 23:22:13 2011
@@ -116,7 +116,7 @@ public class GenericDelegator implements
private boolean testMode = false;
private boolean testRollbackInProgress = false;
- private static final AtomicReferenceFieldUpdater<GenericDelegator, LinkedBlockingDeque> testOperationsUpdater = AtomicReferenceFieldUpdater.newUpdater(GenericDelegator.class, LinkedBlockingDeque.class, "testOperations");
+ private static final AtomicReferenceFieldUpdater<GenericDelegator, LinkedBlockingDeque<?>> testOperationsUpdater = UtilGenerics.cast(AtomicReferenceFieldUpdater.newUpdater(GenericDelegator.class, LinkedBlockingDeque.class, "testOperations"));
private volatile LinkedBlockingDeque<TestOperation> testOperations = null;
private enum OperationType {INSERT, UPDATE, DELETE}
@@ -2765,7 +2765,7 @@ public class GenericDelegator implements
private void setTestMode(boolean testMode) {
this.testMode = testMode;
if (testMode) {
- testOperationsUpdater.set(this, new LinkedBlockingDeque());
+ testOperationsUpdater.set(this, new LinkedBlockingDeque<TestOperation>());
} else {
this.testOperations.clear();
}