You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/12/13 13:01:06 UTC

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #1931: DRILL-6332: Allow to provide two-component Kerberos principals

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:
users@infra.apache.org


With regards,
Apache Git Services