arina-ielchiieva commented on a change in pull request #1931: DRILL-6332: Allow 
to provide two-component Kerberos principals
URL: https://github.com/apache/drill/pull/1931#discussion_r357632967
 
 

 ##########
 File path: common/src/main/java/org/apache/drill/common/KerberosUtil.java
 ##########
 @@ -38,29 +38,39 @@
    * Returns principal of format primary/instance@REALM.
    *
    * @param primary non-null primary component
-   * @param instance non-null instance component
+   * @param instance non-null instance component, can be empty string
    * @param realm non-null realm component
-   * @return principal of format primary/instance@REALM
+   * @return principal of format primary/instance@REALM or primary@REALM
    */
   public static String getPrincipalFromParts(final String primary, final 
String instance, final String realm) {
-    return checkNotNull(primary) + "/" +
-        checkNotNull(instance) + "@" +
-        checkNotNull(realm);
+    checkNotNull(primary);
+    checkNotNull(realm);
+
+    return checkNotNull(primary) +
 
 Review comment:
   You have already checked that primary and real are not null

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to