Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25472

HBASE-24260 breaks JDK7 compilation in branch-1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Found in PR-2799.

      public static String getZKQuorum(Configuration conf) {
          String port =
            Integer.toString(conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT, 2181));
          String[] serverHosts = conf.getStrings(HConstants.ZOOKEEPER_QUORUM, "localhost");
          for (int i = 0; i < serverHosts.length; i++) {
            serverHosts[i] = serverHosts[i] + ":" + port;
          }
          return String.join(",", serverHosts);
        }
      

      Fails to compile

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project hbase-it: Compilation failure
      [ERROR] /home/jenkins/jenkins-home/workspace/Base-PreCommit-GitHub-PR_PR-2799/src/hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java:[46,18] cannot find symbol
      [ERROR] symbol: method join(java.lang.String,java.lang.String[])
      [ERROR] location: class java.lang.String

      because String.join() is only available since JDK8.

      CC: Lokesh Khurana Nick Dimiduk

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                weichiu Wei-Chiu Chuang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: