41
41
*/
42
42
public abstract class DelegatingByTopicSerialization <T extends Closeable > implements Closeable {
43
43
44
+ private static final String UNCHECKED = "unchecked" ;
45
+
44
46
private static final LogAccessor LOGGER = new LogAccessor (DelegatingDeserializer .class );
45
47
46
48
/**
@@ -74,7 +76,7 @@ public abstract class DelegatingByTopicSerialization<T extends Closeable> implem
74
76
75
77
private T defaultDelegate ;
76
78
77
- protected boolean forKeys ;
79
+ private boolean forKeys ;
78
80
79
81
private boolean cased = true ;
80
82
@@ -94,7 +96,7 @@ public void setCaseSensitive(boolean caseSensitive) {
94
96
this .cased = caseSensitive ;
95
97
}
96
98
97
- @ SuppressWarnings ("unchecked" )
99
+ @ SuppressWarnings (UNCHECKED )
98
100
protected void configure (Map <String , ?> configs , boolean isKey ) {
99
101
this .forKeys = isKey ;
100
102
Object insensitive = configs .get (CASE_SENSITIVE );
@@ -140,7 +142,7 @@ private void processMap(Map<String, ?> configs, boolean isKey, String configKey,
140
142
});
141
143
}
142
144
143
- @ SuppressWarnings ("unchecked" )
145
+ @ SuppressWarnings (UNCHECKED )
144
146
protected void build (Map <String , ?> configs , boolean isKey , String configKey , Object delegate , Pattern pattern ) {
145
147
146
148
if (isInstance (delegate )) {
@@ -159,7 +161,7 @@ else if (delegate instanceof String) {
159
161
}
160
162
}
161
163
162
- @ SuppressWarnings ("unchecked" )
164
+ @ SuppressWarnings (UNCHECKED )
163
165
protected void buildDefault (Map <String , ?> configs , String configKey , boolean isKey , Object delegate ) {
164
166
165
167
if (isInstance (delegate )) {
@@ -239,7 +241,7 @@ protected T instantiateAndConfigure(Map<String, ?> configs, boolean isKey, Map<P
239
241
@ Nullable Pattern pattern , Class <?> clazz ) {
240
242
241
243
try {
242
- @ SuppressWarnings ("unchecked" )
244
+ @ SuppressWarnings (UNCHECKED )
243
245
T delegate = (T ) clazz .getDeclaredConstructor ().newInstance ();
244
246
configureDelegate (configs , isKey , delegate );
245
247
if (pattern != null ) {
@@ -266,7 +268,7 @@ public T removeDelegate(Pattern pattern) {
266
268
* @param topic the topic.
267
269
* @return the delegate.
268
270
*/
269
- @ SuppressWarnings ("unchecked" )
271
+ @ SuppressWarnings (UNCHECKED )
270
272
protected T findDelegate (String topic ) {
271
273
T delegate = null ;
272
274
for (Entry <Pattern , T > entry : this .delegates .entrySet ()) {
0 commit comments