code: public static String concatPackages(final String package1, final String package2) {
          if ((package1 == null) || (package1.length() == 0)) {
              if ((package2 == null) || (package2.length() == 0)) {
                  return "";
              } else {
                  return package2;
              }
          } else {
              if ((package2 == null) || (package2.length() == 0)) {
                  return package1;
              } else {
                  return package1 + "." + package2;
              }
          }
      }
docs: Merge two packages into one. If any package is null or empty no "." will
  be added. If both packages are null an empty string will be returned.
  
  @param package1
  First package - Can also be null or empty.
  @param package2
  Second package - Can also be null or empty.
  
  @return Both packages added with ".".