Fix ProtocolVersion#isKnown javadoc to make difference with isRegistered more clear

This commit is contained in:
FlorianMichael 2024-10-23 17:02:45 +02:00 committed by Nassim Jahnke
parent c556420870
commit 54daa11ce4
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -287,12 +287,12 @@ public class ProtocolVersion implements Comparable<ProtocolVersion> {
}
/**
* Returns whether the protocol is set. Should only be unknown for unregistered protocols returned by {@link #getProtocol(int)}.
* Returns whether the protocol version is {@link #unknown}. For checking if the protocol version is registered, use {@link #isRegistered(VersionType, int)}
*
* @return true if the protocol is set
* @return true if the protocol version is unknown
*/
public boolean isKnown() {
return version != -1;
return this != unknown;
}
/**