File tree 1 file changed +9
-5
lines changed
src/main/java/com/fasterxml/jackson/databind/introspect
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,17 @@ public String findEnumValue(Enum<?> value)
73
73
Field f = value .getClass ().getField (value .name ());
74
74
if (f != null ) {
75
75
JsonProperty prop = f .getAnnotation (JsonProperty .class );
76
- String n = prop .value ();
77
- if (n != null && !n .isEmpty ()) {
78
- return n ;
76
+ if (prop != null ) {
77
+ String n = prop .value ();
78
+ if (n != null && !n .isEmpty ()) {
79
+ return n ;
80
+ }
79
81
}
80
82
}
81
- } catch (Exception e ) {
82
- // no such field, or access; neither which we can do much about
83
+ } catch (SecurityException e ) {
84
+ // 17-Sep-2015, tatu: Anything we could/should do here?
85
+ } catch (NoSuchFieldException e ) {
86
+ // 17-Sep-2015, tatu: should not really happen. But... can we do anything?
83
87
}
84
88
return value .name ();
85
89
}
You can’t perform that action at this time.
0 commit comments