...
diff --git a/src/test/org/codehaus/jackson/map/ser/TestEnumSerialization.java b/src/test/org/codehaus/jackson/map/ser/TestEnumSerialization.java
index a0c02ce..4057676 100644
--- a/src/test/org/codehaus/jackson/map/ser/TestEnumSerialization.java
+++ b/src/test/org/codehaus/jackson/map/ser/TestEnumSerialization.java
@@ -97,11 +97,11 @@
}
// [JACKSON-757]
- static enum NOK {
+ static enum NOT_OK {
V1("v1");
protected String key;
// any runtime-persistent annotation is fine
- NOK(@JsonProperty String key) { this.key = key; }
+ NOT_OK(@JsonProperty String key) { this.key = key; }
}
static enum OK {
@@ -109,14 +109,6 @@
protected String key;
OK(String key) { this.key = key; }
}
-
- // problems with annotations on enum value constructors
- public void testIssue757() throws Exception
- {
- ObjectMapper mapper = new ObjectMapper();
- mapper.writeValueAsString(OK.V1);
- mapper.writeValueAsString(NOK.V1);
- }
/*
/**********************************************************
@@ -259,4 +251,12 @@
mapper.enable(SerializationConfig.Feature.WRITE_ENUMS_USING_INDEX);
assertEquals("1", mapper.writeValueAsString(TestEnum.B));
}
+
+ // [JACKSON-757]
+ public void testAnnotationsOnEnumCtor() throws Exception
+ {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.writeValueAsString(OK.V1);
+ mapper.writeValueAsString(NOT_OK.V1);
+ }
}