Remove KafkaPrincipal#fromString for 3.0
Reviewers: Ismael Juma
*/
package org.apache.kafka.common.security.auth;
-import org.apache.kafka.common.utils.SecurityUtils;
-
import java.security.Principal;
import static java.util.Objects.requireNonNull;
@@ -60,19 +58,6 @@ public class KafkaPrincipal implements Principal {
this.tokenAuthenticated = tokenAuthenticated;
}
- /**
- * Parse a {@link KafkaPrincipal} instance from a string. This method cannot be used for {@link KafkaPrincipal}
- * extensions.
- *
- * @param str The input string formatted as "{principalType}:{principalName}"
- * @return The parsed {@link KafkaPrincipal} instance
- * @deprecated As of 1.0.0. This method will be removed in a future major release.
- */
- @Deprecated
- public static KafkaPrincipal fromString(String str) {
- return SecurityUtils.parseKafkaPrincipal(str);
- }
-
@Override
public String toString() {
return principalType + ":" + name;
