public static String concatenateRealmPath(String parentRealm,String subrealm){
  String realm;
  if (subrealm == null) {
    realm=parentRealm;
  }
 else {
    subrealm=cleanRealm(subrealm);
    if (parentRealm == null || parentRealm.equals("/")) {
      realm=subrealm;
    }
 else {
      realm=parentRealm + subrealm;
    }
  }
  return cleanRealm(realm);
}

public static String concatenateRealmPath ( String parentRealm , String subrealm ) { String realm ; if ( subrealm == null ) { realm = parentRealm ; } else { subrealm = cleanRealm ( subrealm ) ; if ( parentRealm == null || parentRealm . equals ( "/" ) ) { realm = subrealm ; } else { realm = parentRealm + subrealm ; } } return cleanRealm ( realm ) ; }
takes two realm and concatenates them together
