Ejemplo n.º 1
0
 /**
  * Populates a DataValue from the supplied array of tokens.
  *
  * @param tokens The tokens to use when building a DataValue.
  * @param destValue That this populator is filling with content.
  */
 @Override
 void populate(final String[] tokens, final Value destValue) {
   // BugzID:722 - Only populate the value if we have one from the file
   if (tokens.length > DATA_INDEX) {
     destValue.set(stripEscChars(tokens[DATA_INDEX]));
   }
 }
Ejemplo n.º 2
0
    /**
     * Populates a DataValue from the supplied array of tokens.
     *
     * @param tokens The tokens to use when building a DataValue.
     * @param destValue That this populator is filling with content.
     */
    @Override
    void populate(final String[] tokens, final Value destValue) {
      // BugzID:722 - Only populate the value if we have one from the file
      if (tokens.length > DATA_INDEX) {
        String text = "";

        for (int i = DATA_INDEX; i < tokens.length; i++) {
          text = text.concat(tokens[i]);

          if (i < (tokens.length - 1)) {
            text = text.concat(",");
          }
        }

        destValue.set(stripEscChars(text));
      }
    }