This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch 4.3
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/4.3 by this push:
     new 41159f7b9e2 MINOR: fix incorrect JavaDocs for headers-stores (#22043)
41159f7b9e2 is described below

commit 41159f7b9e2756c6d381e9f6430ca30244c8111b
Author: Matthias J. Sax <[email protected]>
AuthorDate: Tue Apr 14 09:12:20 2026 -0700

    MINOR: fix incorrect JavaDocs for headers-stores (#22043)
    
    Reviewers: TengYao Chi <[email protected]>
---
 .../kafka/streams/state/QueryableStoreTypes.java   |  6 +-
 .../apache/kafka/streams/TopologyTestDriver.java   | 65 +++++++++++++++-------
 .../kafka/streams/TopologyTestDriverTest.java      | 22 ++++----
 3 files changed, 58 insertions(+), 35 deletions(-)

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/state/QueryableStoreTypes.java 
b/streams/src/main/java/org/apache/kafka/streams/state/QueryableStoreTypes.java
index 1f6f1b8890b..9f23e585581 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/state/QueryableStoreTypes.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/state/QueryableStoreTypes.java
@@ -62,7 +62,7 @@ public final class QueryableStoreTypes {
      *
      * @param <K> key type of the store
      * @param <V> value type of the store
-     * @return {@link QueryableStoreTypes.TimestampedKeyValueStoreType}
+     * @return {@link 
QueryableStoreTypes.TimestampedKeyValueStoreWithHeadersType}
      */
     public static <K, V> QueryableStoreType<ReadOnlyKeyValueStore<K, 
ValueTimestampHeaders<V>>> timestampedKeyValueStoreWithHeaders() {
         return new TimestampedKeyValueStoreWithHeadersType<>();
@@ -91,7 +91,7 @@ public final class QueryableStoreTypes {
     }
 
     /**
-     * A {@link QueryableStoreType} that accepts {@link ReadOnlyWindowStore 
ReadOnlyWindowStore&lt;K, ValueTimestampeHeaders&lt;V&gt;&gt;}.
+     * A {@link QueryableStoreType} that accepts {@link ReadOnlyWindowStore 
ReadOnlyWindowStore&lt;K, ValueTimestampHeaders&lt;V&gt;&gt;}.
      *
      * @param <K> key type of the store
      * @param <V> value type of the store
@@ -113,7 +113,7 @@ public final class QueryableStoreTypes {
     }
 
     /**
-     * A {@link QueryableStoreType} that accepts {@link ReadOnlySessionStore 
ReadOnlySessionStoree&lt;K, AggregationWithHeaders&lt;V&gt;&gt;}.
+     * A {@link QueryableStoreType} that accepts {@link ReadOnlySessionStore 
ReadOnlySessionStore&lt;K, AggregationWithHeaders&lt;V&gt;&gt;}.
      *
      * @param <K> key type of the store
      * @param <V> value type of the store
diff --git 
a/streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
 
b/streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
index b7300f14454..f9a85d83b03 100644
--- 
a/streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
+++ 
b/streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
@@ -989,19 +989,22 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link KeyValueStore} or {@link TimestampedKeyValueStore} with 
the given name.
+     * Get the {@link KeyValueStore}, {@link TimestampedKeyValueStore}, or 
{@link TimestampedKeyValueStoreWithHeaders}
+     * with the given name.
      * The store can be a "regular" or global store.
      * <p>
-     * If the registered store is a {@link TimestampedKeyValueStore} this 
method will return a value-only query
-     * interface. <strong>It is highly recommended to update the code for this 
case to avoid bugs and to use
-     * {@link #getTimestampedKeyValueStore(String)} for full store access 
instead.</strong>
+     * If the registered store is a {@link TimestampedKeyValueStore} or {@link 
TimestampedKeyValueStoreWithHeaders}
+     * this method will return a value-only query interface.
+     * <strong>It is highly recommended to update the code for this case to 
avoid bugs and to use
+     * {@link #getTimestampedKeyValueStore(String)} or {@link 
#getTimestampedKeyValueStoreWithHeaders(String)}
+     * for full store access instead.</strong>
      * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link 
KeyValueStore} or {@link TimestampedKeyValueStore}
-     * has been registered with the given name
+     * @return the key value store, or {@code null} if no {@link 
KeyValueStore}, {@link TimestampedKeyValueStore}, or
+     * {@link TimestampedWindowStoreWithHeaders} has been registered with the 
given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getTimestampedKeyValueStore(String)
@@ -1028,14 +1031,19 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link TimestampedKeyValueStore} with the given name.
+     * Get the {@link TimestampedKeyValueStore} or {@link 
TimestampedKeyValueStoreWithHeaders} with the given name.
      * The store can be a "regular" or global store.
      * <p>
+     * If the registered store is a {@link 
TimestampedKeyValueStoreWithHeaders} this method will return a value-ts-only 
query interface.
+     * <strong>It is highly recommended to update the code for this case to 
avoid bugs and to use
+     * {@link #getTimestampedKeyValueStoreWithHeaders(String)} for full store 
access instead.</strong>
+     * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link 
TimestampedKeyValueStore} has been registered with the given name
+     * @return the key value store, or {@code null} if no {@link 
TimestampedKeyValueStore} or
+     * {@link TimestampedKeyValueStoreWithHeaders }has been registered with 
the given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
@@ -1090,7 +1098,7 @@ public class TopologyTestDriver implements Closeable {
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link 
VersionedKeyValueStore} has been registered with the given name
+     * @return the versioned store, or {@code null} if no {@link 
VersionedKeyValueStore} has been registered with the given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
@@ -1109,19 +1117,22 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link WindowStore} or {@link TimestampedWindowStore} with the 
given name.
+     * Get the {@link WindowStore}, {@link TimestampedWindowStore}, or {@link 
TimestampedWindowStoreWithHeaders}
+     * with the given name.
      * The store can be a "regular" or global store.
      * <p>
-     * If the registered store is a {@link TimestampedWindowStore} this method 
will return a value-only query
-     * interface. <strong>It is highly recommended to update the code for this 
case to avoid bugs and to use
-     * {@link #getTimestampedWindowStore(String)} for full store access 
instead.</strong>
+     * If the registered store is a {@link TimestampedWindowStore} or {@link 
TimestampedWindowStoreWithHeaders}
+     * this method will return a value-only query interface.
+     * <strong>It is highly recommended to update the code for this case to 
avoid bugs and to use
+     * {@link #getTimestampedWindowStore(String)} or {@link 
#getTimestampedWindowStoreWithHeaders(String)}
+     * for full store access instead.</strong>
      * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link WindowStore} 
or {@link TimestampedWindowStore}
-     * has been registered with the given name
+     * @return the window store, or {@code null} if no {@link WindowStore}, 
{@link TimestampedWindowStore}, or
+     * {@link TimestampedWindowStoreWithHeaders} has been registered with the 
given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
@@ -1148,14 +1159,20 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link TimestampedWindowStore} with the given name.
+     * Get the {@link TimestampedWindowStore} or {@link 
TimestampedWindowStoreWithHeaders} with the given name.
      * The store can be a "regular" or global store.
      * <p>
+     * If the registered store is a {@link TimestampedWindowStoreWithHeaders}
+     * this method will return a value-ts--only query interface.
+     * <strong>It is highly recommended to update the code for this case to 
avoid bugs and to use
+     * {@link #getTimestampedWindowStoreWithHeaders(String)} for full store 
access instead.</strong>
+     * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link 
TimestampedWindowStore} has been registered with the given name
+     * @return the window store, or {@code null} if no {@link 
TimestampedWindowStore} or
+     * {@link TimestampedWindowStoreWithHeaders} has been registered with the 
given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
@@ -1203,14 +1220,20 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link SessionStore} with the given name.
+     * Get the {@link SessionStore} or {@link SessionStoreWithHeaders} with 
the given name.
      * The store can be a "regular" or global store.
      * <p>
+     * If the registered store is a {@link SessionStoreWithHeaders}
+     * this method will return a value--only query interface.
+     * <strong>It is highly recommended to update the code for this case to 
avoid bugs and to use
+     * {@link #getSessionStoreWithHeaders(String)} for full store access 
instead.</strong>
+     * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link SessionStore} 
has been registered with the given name
+     * @return the session store, or {@code null} if no {@link SessionStore} 
or {@link SessionStoreWithHeaders}
+     * has been registered with the given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
@@ -1232,14 +1255,14 @@ public class TopologyTestDriver implements Closeable {
     }
 
     /**
-     * Get the {@link SessionStore} with the given name.
+     * Get the {@link SessionStoreWithHeaders} with the given name.
      * The store can be a "regular" or global store.
      * <p>
      * This is often useful in test cases to pre-populate the store before the 
test case instructs the topology to
      * {@link TestInputTopic#pipeInput(TestRecord) process an input message}, 
and/or to check the store afterward.
      *
      * @param name the name of the store
-     * @return the key value store, or {@code null} if no {@link SessionStore} 
has been registered with the given name
+     * @return the session store, or {@code null} if no {@link 
SessionStoreWithHeaders} has been registered with the given name
      * @see #getAllStateStores()
      * @see #getStateStore(String)
      * @see #getKeyValueStore(String)
diff --git 
a/streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
 
b/streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
index 7555c078330..c8651c50ec6 100644
--- 
a/streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
+++ 
b/streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
@@ -915,7 +915,7 @@ public abstract class TopologyTestDriverTest {
     private void shouldReturnCorrectStoreTypeOnly(final boolean persistent) {
         final String keyValueStoreName = "keyValueStore";
         final String timestampedKeyValueStoreName = "keyValueTimestampStore";
-        final String timestampedKeyValueStoreWithHeaderName = 
"keyValueTimestampStoreWithHeaders";
+        final String timestampedKeyValueStoreWithHeadersName = 
"keyValueTimestampStoreWithHeaders";
         final String versionedKeyValueStoreName = "keyValueVersionedStore";
         final String windowStoreName = "windowStore";
         final String timestampedWindowStoreName = "windowTimestampStore";
@@ -933,7 +933,7 @@ public abstract class TopologyTestDriverTest {
             persistent,
             keyValueStoreName,
             timestampedKeyValueStoreName,
-            timestampedKeyValueStoreWithHeaderName,
+            timestampedKeyValueStoreWithHeadersName,
             versionedKeyValueStoreName,
             windowStoreName,
             timestampedWindowStoreName,
@@ -981,15 +981,15 @@ public abstract class TopologyTestDriverTest {
             
assertNull(testDriver.getSessionStoreWithHeaders(versionedKeyValueStoreName));
         }
 
-        
assertNotNull(testDriver.getKeyValueStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNotNull(testDriver.getTimestampedKeyValueStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNotNull(testDriver.getTimestampedKeyValueStoreWithHeaders(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getVersionedKeyValueStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getWindowStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getTimestampedWindowStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getTimestampedWindowStoreWithHeaders(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getSessionStore(timestampedKeyValueStoreWithHeaderName));
-        
assertNull(testDriver.getSessionStoreWithHeaders(timestampedKeyValueStoreWithHeaderName));
+        
assertNotNull(testDriver.getKeyValueStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNotNull(testDriver.getTimestampedKeyValueStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNotNull(testDriver.getTimestampedKeyValueStoreWithHeaders(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getVersionedKeyValueStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getWindowStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getTimestampedWindowStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getTimestampedWindowStoreWithHeaders(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getSessionStore(timestampedKeyValueStoreWithHeadersName));
+        
assertNull(testDriver.getSessionStoreWithHeaders(timestampedKeyValueStoreWithHeadersName));
 
         assertNull(testDriver.getKeyValueStore(windowStoreName));
         assertNull(testDriver.getTimestampedKeyValueStore(windowStoreName));

Reply via email to