stoty commented on code in PR #17901:
URL: https://github.com/apache/kafka/pull/17901#discussion_r1853486899


##########
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerSaslClient.java:
##########
@@ -129,16 +129,12 @@ public boolean isComplete() {
 
     @Override
     public byte[] unwrap(byte[] incoming, int offset, int len) {
-        if (!isComplete())
-            throw new IllegalStateException("Authentication exchange has not 
completed");
-        return Arrays.copyOfRange(incoming, offset, offset + len);
+        throw new IllegalStateException("Mechanism does not support integrity 
nor confidentality");

Review Comment:
   Thanks, re-written to match the JDK behaviour and be more consistent with 
the existing code.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to