You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2015/07/21 22:52:46 UTC
[49/50] ode git commit: add ignore fields list to migration
regression tests in order to deal with the fix for ODE-1023.
add ignore fields list to migration regression tests in order to deal with the fix for ODE-1023.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/e632e0a6
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/e632e0a6
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/e632e0a6
Branch: refs/heads/ODE-912
Commit: e632e0a6c1e7c8f0b7b189789d459624c29cb5e8
Parents: c3fb423
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Jul 21 20:48:48 2015 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue Jul 21 20:48:48 2015 +0200
----------------------------------------------------------------------
.../ode/bpel/obj/migrate/DeepEqualityHelper.java | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/e632e0a6/bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java
----------------------------------------------------------------------
diff --git a/bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java b/bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java
index 1872894..5ddab47 100644
--- a/bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java
+++ b/bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java
@@ -37,6 +37,13 @@ public class DeepEqualityHelper{
private Map<Long, Boolean> cache = new HashMap<Long, Boolean>();
+ private final List<String> IGNORE_FIELDS = new ArrayList<String>();
+ {
+ // due to ODE-1023, we set all document element to null in compiled process models. Thus we need to exclude them
+ // from the comparison because the were still set in old CBP files.
+ IGNORE_FIELDS.add("protected org.w3c.dom.Element com.ibm.wsdl.AbstractWSDLElement.docEl");
+ }
+
public boolean deepEquals(Object obj1, Object obj2){
// __log.debug("comparing Objects: " + obj1 + " and " + obj2); //will cause too much log
Boolean c = cachedRes(obj1, obj2);
@@ -171,7 +178,7 @@ public class DeepEqualityHelper{
if (contains(c2, o1) == null) {
if (!logFalseThrough){
__log.debug("Unequal in Set: Object mismatch. " + st +
- "\n" + "cann't find " + o1);
+ "\n" + "can't find " + o1);
}
st.pop();
return false;
@@ -307,6 +314,13 @@ public class DeepEqualityHelper{
if (v1 == null && v2 == null){
continue;
}
+
+ if (IGNORE_FIELDS.contains(f.toString())) {
+ __log.debug("Ignoring field " + f.getName() + " with values " + v1 + " and " + v2);
+
+ continue;
+ }
+
st.push(f.getName()+ ":" + f.getType().getSimpleName());
if (v1 == null || v2 == null){
if (!logFalseThrough){