public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
    meta = (SplitFieldToRowsMeta) smi;
    data = (SplitFieldToRowsData) sdi;

    if ( super.init( smi, sdi ) ) {
      data.rownr = 1L;

      try {
        String delimiter = Const.nullToEmpty( meta.getDelimiter() );
        if ( meta.isDelimiterRegex() ) {
          data.delimiterPattern = Pattern.compile( environmentSubstitute( delimiter ) );
        } else {
          data.delimiterPattern = Pattern.compile( Pattern.quote( environmentSubstitute( delimiter ) ) );
        }
      } catch ( PatternSyntaxException pse ) {
        log.logError( pse.getMessage() );
        throw pse;
      }

      return true;
    }
    return false;
  }
@Test
  public void interpretsNullDelimiterAsEmpty() throws Exception {
    SplitFieldToRows step =
      StepMockUtil.getStep( SplitFieldToRows.class, SplitFieldToRowsMeta.class, "handlesNullDelimiter" );

    SplitFieldToRowsMeta meta = new SplitFieldToRowsMeta();
    meta.setDelimiter( null );
    meta.setDelimiterRegex( false );

    SplitFieldToRowsData data = new SplitFieldToRowsData();

    step.init( meta, data );
    // empty string should be quoted --> \Q\E
    assertEquals( "\\Q\\E", data.delimiterPattern.pattern() );
  }