Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-357

Incorrect ParseDate CSV cell processor value in tests reading movies data

    XMLWordPrintable

Details

    Description

      When reading CSV data using super-csv library, one can specify cell processors for columns. Some tests use the incorrect format:
      ParseDate(YYYY-MM-dd), which should be
      ParseDate('yyyy-MM-dd')

      Affected files:
      jberet-support/src/test/java/org/jberet/support/io/MovieTest.java
      wildfly-jberet-samples/jberet-samples-common/src/main/resources/META-INF/batch-jobs/csvItemReader.xml

      The symptom is, when reading items into java.util.Map types, the date objects only have year value, i.e., all movie open dates will be 2012-01-01. See attachment screenshot 06-psql.png (running intro-jberet app, csv2db.xml job, in OpenShift, screen showing PostgreSQL database content after job completion)

      After the fix, the screenshot Screenshot-2017-10-1 OpenShift Web Console.png shows the correctly formated date in opn column.

      Attachments

        Activity

          People

            cfang@redhat.com Cheng Fang
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: