replace Jackson specific @JsonIgnore annotation with JAXB @XmlTransient 06/67206/2
authorMichael Vorburger <vorburger@redhat.com>
Tue, 16 Jan 2018 13:26:45 +0000 (14:26 +0100)
committerIsaku Yamahata <isaku.yamahata@gmail.com>
Tue, 16 Jan 2018 19:21:54 +0000 (19:21 +0000)
on NeutronObject's setTenantID(Uuid tenantID), but note
setTenantID(String tenantID), although with @XmlElement(name =
"tenant_id") on field String tenantID and
@XmlAccessorType(XmlAccessType.NONE) annotating the setter was probably
pointless anyway,

and remove dependency to jackson-annotations,

because neutron (apparently, so learnt in NEUTRON-154!) uses Moxy and
not Jackson, at least clearly now it does, perhaps in the past it once
used Jackson, so this annotation was probably already always ignored
anyway.

This is safe and should not break anything, because if it did, then the
ITNeutronE2E would detect any major regressions (and it still passes
with this change).

found while rummaging around neutron code related to NEUTRON-154

Change-Id: I6b815cdade1a7e0877c456520f7f0f5b9215057c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
neutron-spi/pom.xml
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java

index c6e4d23ef30b02e9d8182b341eb5ba1666c03830..1995ba01c20e9767518d8874942e15cc22a1717d 100644 (file)
        <artifactId>org.eclipse.persistence.moxy</artifactId>
        <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-    </dependency>
   </dependencies>
   <build>
     <plugins>
index 5a2c1dcfdbff45909c212898ffdd96761f821c76..cfd4302f5c875babac49b1d65cf8575f3a47909c 100644 (file)
@@ -9,7 +9,6 @@
 
 package org.opendaylight.neutron.spi;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import java.io.Serializable;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -18,6 +17,7 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -61,7 +61,7 @@ public abstract class NeutronObject<T extends NeutronObject> extends NeutronID
     }
 
     @Override
-    @JsonIgnore
+    @XmlTransient
     public void setTenantID(Uuid tenantID) {
         this.tenantID = tenantID.getValue().replace("-", "");
     }