[jackson-annotations] 28/207: ...

Timo Aaltonen tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

tjaalton pushed a commit to branch master
in repository jackson-annotations.

commit 7575be37ff6e44ea349e3ff50d1fddf239e8bf6d
Author: Tatu Saloranta <tsaloranta at gmail.com>
Date:   Tue Feb 21 16:43:34 2012 -0800

    ...
---
 .../com/fasterxml/jackson/annotation/JsonBackReference.java |  2 --
 .../fasterxml/jackson/annotation/JsonIgnoreProperties.java  | 13 +++++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java b/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java
index ec5f036..0ffe1c1 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonBackReference.java
@@ -23,8 +23,6 @@ import java.lang.annotation.Target;
  * Note: only methods and fields can be annotated with this annotation: constructor
  * arguments should NOT be annotated, as they can not be either managed or back
  * references.
- * 
- * @author tatu
  */
 @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java
index 6fd6f08..87978d6 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonIgnoreProperties.java
@@ -14,14 +14,19 @@ import java.lang.annotation.Target;
  *<pre>
  * // to prevent specified fields from being serialized or deserialized
  * // (i.e. not include in JSON output; or being set even if they were included)
- * \@JsonIgnoreProperties({ "internalId", "secretKey" })
+ * @JsonIgnoreProperties({ "internalId", "secretKey" })
  * // To ignore any unknown properties in JSON input without exception:
- * \@JsonIgnoreProperties(ignoreUnknown=true)
+ * @JsonIgnoreProperties(ignoreUnknown=true)
  *</pre>
  *<p>
- * Only applicable to classes, not for properties (getters, setters, fields).
+ * Starting with 2.0, this annotation can be applied both to classes and
+ * to properties. If used for both, actual set will be union of all
+ * ignorals: that is, you can only add properties to ignore, not remove
+ * or override. So you can not remove properties to ignore using
+ * per-property annotation.
  */
- at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+    ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
 @Retention(RetentionPolicy.RUNTIME)
 @JacksonAnnotation
 public @interface JsonIgnoreProperties

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-annotations.git



More information about the pkg-java-commits mailing list