Skip to content

Commit ed86050

Browse files
committed
Fix #434
1 parent f4cbedd commit ed86050

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

release-notes/VERSION-2.x

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Project: jackson-dataformat-xml
5656
from `true` to `false`
5757
#412: Coercion from element-with-attribute-and-text only works for `String`,
5858
not other scalar types
59+
#434: Add missing `ElementType.ANNOTATION_TYPE` for Jackson xml annotations
60+
to allow bundling
5961
- Add Gradle Module Metadata (https://blog.gradle.org/alignment-with-gradle-module-metadata)
6062
- Upgrade Woodstox dependency to 6.2.3 (<- 6.2.1)
6163

src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlCData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Adding this annotation will result in value of the property to be serialized
1010
* within an xml {@code CDATA} section. Only use on String properties and String collections.
1111
*/
12-
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
12+
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
1313
@Retention(RetentionPolicy.RUNTIME)
1414
public @interface JacksonXmlCData
1515
{

src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlElementWrapper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <code>java.util.Collection</code>). If defined, a separate container (wrapper) element
1212
* is used; if not, entries are written without wrapping.
1313
*/
14-
@Target({ElementType.FIELD, ElementType.METHOD})
14+
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD})
1515
@Retention(RetentionPolicy.RUNTIME)
1616
public @interface JacksonXmlElementWrapper
1717
{

src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlProperty.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* while compiler allows that, will have no effect) -- setter method itself
2626
* needs to be annotated.
2727
*/
28-
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
28+
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
2929
@Retention(RetentionPolicy.RUNTIME)
3030
public @interface JacksonXmlProperty
3131
{

src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlRootElement.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* values and so on; their name is derived from getter/setter/field, not
1515
* from type itself.
1616
*/
17-
@Target({ElementType.TYPE})
17+
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
1818
@Retention(RetentionPolicy.RUNTIME)
1919
public @interface JacksonXmlRootElement
2020
{

src/main/java/com/fasterxml/jackson/dataformat/xml/annotation/JacksonXmlText.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Internally properties annotated will be considered to be properties with
1919
* no name (that is, with marker {@code ""} (empty String)).
2020
*/
21-
@Target({ElementType.FIELD, ElementType.METHOD})
21+
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD})
2222
@Retention(RetentionPolicy.RUNTIME)
2323
public @interface JacksonXmlText
2424
{

0 commit comments

Comments
 (0)