From 45029ab3bc4f6c293f3a59af233f015b71cc0c09 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Tue, 21 Mar 2017 09:30:03 +0000
Subject: [PATCH] #3527 fix - Ignoring unknown properties for unmarshall

---
 securis/src/main/java/net/curisit/securis/db/Application.java |  174 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 87 insertions(+), 87 deletions(-)

diff --git a/securis/src/main/java/net/curisit/securis/db/Application.java b/securis/src/main/java/net/curisit/securis/db/Application.java
index f7f546d..508175a 100644
--- a/securis/src/main/java/net/curisit/securis/db/Application.java
+++ b/securis/src/main/java/net/curisit/securis/db/Application.java
@@ -20,6 +20,7 @@
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.fasterxml.jackson.annotation.JsonManagedReference;
@@ -31,121 +32,120 @@
  */
 @JsonAutoDetect
 @JsonInclude(Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
 @Entity
 @Table(name = "application")
-@NamedQueries({
-    @NamedQuery(name = "list-applications", query = "SELECT a FROM Application a")
-})
+@NamedQueries({ @NamedQuery(name = "list-applications", query = "SELECT a FROM Application a") })
 public class Application implements Serializable {
 
-    private static final Logger LOG = LogManager.getLogger(Application.class);
+	private static final Logger LOG = LogManager.getLogger(Application.class);
 
-    private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-    @Id
-    @GeneratedValue
-    private Integer id;
+	@Id
+	@GeneratedValue
+	private Integer id;
 
-    private String code;
-    private String name;
-    private String description;
+	private String code;
+	private String name;
+	private String description;
 
-    @Column(name = "license_filename")
-    @JsonProperty("license_filename")
-    private String licenseFilename;
+	@Column(name = "license_filename")
+	@JsonProperty("license_filename")
+	private String licenseFilename;
 
-    @Column(name = "creation_timestamp")
-    @JsonProperty("creation_timestamp")
-    private Date creationTimestamp;
+	@Column(name = "creation_timestamp")
+	@JsonProperty("creation_timestamp")
+	private Date creationTimestamp;
 
-    // We don't include the referenced entities to limit the size of each row at
-    // // the listing
-    @JsonIgnore
-    @OneToMany(fetch = FetchType.LAZY, mappedBy = "application")
-    private Set<LicenseType> licenseTypes;
+	// We don't include the referenced entities to limit the size of each row at
+	// // the listing
+	@JsonIgnore
+	@OneToMany(fetch = FetchType.LAZY, mappedBy = "application")
+	private Set<LicenseType> licenseTypes;
 
-    @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "application")
-    @JsonManagedReference
-    private Set<ApplicationMetadata> metadata;
+	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "application")
+	@JsonManagedReference
+	private Set<ApplicationMetadata> metadata;
 
-    public Integer getId() {
-        return id;
-    }
+	public Integer getId() {
+		return id;
+	}
 
-    public void setId(Integer id) {
-        this.id = id;
-    }
+	public void setId(Integer id) {
+		this.id = id;
+	}
 
-    public String getName() {
-        return name;
-    }
+	public String getName() {
+		return name;
+	}
 
-    public void setName(String name) {
-        this.name = name;
-    }
+	public void setName(String name) {
+		this.name = name;
+	}
 
-    public String getDescription() {
-        return description;
-    }
+	public String getDescription() {
+		return description;
+	}
 
-    public void setDescription(String description) {
-        this.description = description;
-    }
+	public void setDescription(String description) {
+		this.description = description;
+	}
 
-    public Date getCreationTimestamp() {
-        return creationTimestamp;
-    }
+	public Date getCreationTimestamp() {
+		return creationTimestamp;
+	}
 
-    public void setCreationTimestamp(Date creationTimestamp) {
-        this.creationTimestamp = creationTimestamp;
-    }
+	public void setCreationTimestamp(Date creationTimestamp) {
+		this.creationTimestamp = creationTimestamp;
+	}
 
-    @JsonProperty("metadata")
-    public Set<ApplicationMetadata> getApplicationMetadata() {
-        return metadata;
-    }
+	@JsonProperty("metadata")
+	public Set<ApplicationMetadata> getApplicationMetadata() {
+		return metadata;
+	}
 
-    @JsonProperty("metadata")
-    public void setApplicationMetadata(Set<ApplicationMetadata> metadata) {
-        this.metadata = metadata;
-    }
+	@JsonProperty("metadata")
+	public void setApplicationMetadata(Set<ApplicationMetadata> metadata) {
+		this.metadata = metadata;
+	}
 
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof Application))
-            return false;
-        Application other = (Application) obj;
-        return id.equals(other.id);
-    }
+	@Override
+	public boolean equals(Object obj) {
+		if (!(obj instanceof Application))
+			return false;
+		Application other = (Application) obj;
+		return id.equals(other.id);
+	}
 
-    @Override
-    public int hashCode() {
+	@Override
+	public int hashCode() {
 
-        return (id == null ? 0 : id.hashCode());
-    }
+		return (id == null ? 0 : id.hashCode());
+	}
 
-    public String getLicenseFilename() {
-        return licenseFilename;
-    }
+	public String getLicenseFilename() {
+		return licenseFilename;
+	}
 
-    public void setLicenseFilename(String licenseFilename) {
-        this.licenseFilename = licenseFilename;
-    }
+	public void setLicenseFilename(String licenseFilename) {
+		this.licenseFilename = licenseFilename;
+	}
 
-    public Set<LicenseType> getLicenseTypes() {
-        LOG.info("Getting list license types!!!!");
-        return licenseTypes;
-    }
+	public Set<LicenseType> getLicenseTypes() {
+		LOG.info("Getting list license types!!!!");
+		return licenseTypes;
+	}
 
-    public void setLicenseTypes(Set<LicenseType> licenseTypes) {
-        this.licenseTypes = licenseTypes;
-    }
+	public void setLicenseTypes(Set<LicenseType> licenseTypes) {
+		this.licenseTypes = licenseTypes;
+	}
 
-    public String getCode() {
-        return code;
-    }
+	public String getCode() {
+		return code;
+	}
 
-    public void setCode(String code) {
-        this.code = code;
-    }
+	public void setCode(String code) {
+		this.code = code;
+	}
 }

--
Gitblit v1.3.2