vvcephei commented on a change in pull request #10744:
URL: https://github.com/apache/kafka/pull/10744#discussion_r640835922



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/internals/SessionCacheFlushListener.java
##########
@@ -19,30 +19,45 @@
 import org.apache.kafka.streams.kstream.Windowed;
 import org.apache.kafka.streams.processor.ProcessorContext;
 import org.apache.kafka.streams.processor.To;
+import org.apache.kafka.streams.processor.api.Record;
 import org.apache.kafka.streams.processor.internals.InternalProcessorContext;
 import org.apache.kafka.streams.processor.internals.ProcessorNode;
 import org.apache.kafka.streams.state.internals.CacheFlushListener;
 
-class SessionCacheFlushListener<K, V> implements 
CacheFlushListener<Windowed<K>, V> {
-    private final InternalProcessorContext context;
+class SessionCacheFlushListener<KOut, VOut> implements 
CacheFlushListener<Windowed<KOut>, VOut> {
+    private final InternalProcessorContext<Windowed<KOut>, Change<VOut>> 
context;
+
+    @SuppressWarnings("rawtypes")
     private final ProcessorNode myNode;
 
+    @SuppressWarnings("unchecked")
     SessionCacheFlushListener(final ProcessorContext context) {
-        this.context = (InternalProcessorContext) context;
+        this.context = (InternalProcessorContext<Windowed<KOut>, 
Change<VOut>>) context;
         myNode = this.context.currentNode();
     }
 
     @Override
-    public void apply(final Windowed<K> key,
-                      final V newValue,
-                      final V oldValue,
+    public void apply(final Windowed<KOut> key,
+                      final VOut newValue,
+                      final VOut oldValue,
                       final long timestamp) {
-        final ProcessorNode prev = context.currentNode();
+        @SuppressWarnings("rawtypes") final ProcessorNode prev = 
context.currentNode();

Review comment:
       Just to limit the scope of the suppression and not mask other mistakes.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to