Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-175

Replace manual array copy to utility method call

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: None
    • Labels:
      None

      Description

            String[] zkJavaOptsArray = zkJavaOptsString.split(" ");
            if (zkJavaOptsArray != null) {
              for (String javaOpt : zkJavaOptsArray) {
                commandList.add(javaOpt);
              }
            }

      Rather than doing the loop ourselves, Collections.addAll would be simpler (and faster, though that doesn't matter with such a small array). Still cleaner, though.

        Attachments

          Activity

            People

            • Assignee:
              devaraj.k Devaraj K
              Reporter:
              jghoman Jakob Homan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: