Skip to content

Commit be90675

Browse files
committed
Merge branch '2.12'
2 parents 77b1155 + 62ae580 commit be90675

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/main/java/com/fasterxml/jackson/databind/introspect/DefaultAccessorNamingStrategy.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ public String findNameForRegularGetter(AnnotatedMethod am, String name)
6161
// method "getCallbacks". Not sure of exact safe criteria to get decent
6262
// coverage without false matches; but for now let's assume there is
6363
// no reason to use any such getter from CGLib.
64+
65+
// 05-Oct-2020, tatu: Removed from Jackson 3.0
66+
/*
6467
if ("getCallbacks".equals(name)) {
65-
if (isCglibGetCallbacks(am)) {
68+
if (_isCglibGetCallbacks(am)) {
6669
return null;
6770
}
68-
} else if ("getMetaClass".equals(name)) {
71+
} else */
72+
if ("getMetaClass".equals(name)) {
6973
// 30-Apr-2009, tatu: Need to suppress serialization of a cyclic reference
70-
if (isGroovyMetaClassGetter(am)) {
74+
if (_isGroovyMetaClassGetter(am)) {
7175
return null;
7276
}
7377
}
@@ -128,7 +132,7 @@ protected static String stdManglePropertyName(final String basename, final int o
128132

129133
/*
130134
/**********************************************************************
131-
/* Legacy methods copied in 2.12 from "BeanUtil" -- are these still needed?
135+
/* Legacy methods moved in 2.12 from "BeanUtil" -- are these still needed?
132136
/**********************************************************************
133137
*/
134138

@@ -137,7 +141,10 @@ protected static String stdManglePropertyName(final String basename, final int o
137141
// At this point caller has detected a potential getter method with
138142
// name "getCallbacks" and we need to determine if it is indeed injected
139143
// by Cglib. We do this by verifying that the result type is "net.sf.cglib.proxy.Callback[]"
140-
private static boolean isCglibGetCallbacks(AnnotatedMethod am)
144+
145+
// 05-Oct-2020, tatu: Removed from 3.0
146+
/*
147+
protected boolean _isCglibGetCallbacks(AnnotatedMethod am)
141148
{
142149
Class<?> rt = am.getRawType();
143150
// Ok, first: must return an array type
@@ -159,9 +166,11 @@ private static boolean isCglibGetCallbacks(AnnotatedMethod am)
159166
}
160167
return false;
161168
}
169+
*/
162170

171+
// 05-Oct-2020, tatu: Left in 3.0 for now
163172
// Another helper method to deal with Groovy's problematic metadata accessors
164-
private static boolean isGroovyMetaClassGetter(AnnotatedMethod am) {
173+
protected boolean _isGroovyMetaClassGetter(AnnotatedMethod am) {
165174
return am.getRawType().getName().startsWith("groovy.lang");
166175
}
167176

0 commit comments

Comments
 (0)