Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-1921

Use StringBuilder instead of StringBuffer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • parquet-mr

    Description

      MessageTypeParser.java
          private StringBuffer currentLine = new StringBuffer();
      
          ....
      
          public String nextToken() {
            while (st.hasMoreTokens()) {
              String t = st.nextToken();
              if (t.equals("\n")) {
                ++ line;
                currentLine.setLength(0);
              } else {
                currentLine.append(t);
              }
              if (!isWhitespace(t)) {
                return t;
              }
            }
            throw new IllegalArgumentException("unexpected end of schema");
          }
      

      Use StringBuilder instead of StringBuffer as StringBuffer is synchronized (which is not required here).

      Attachments

        Activity

          People

            Unassigned Unassigned
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: