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

Incorrect ParseDate CSV cell processor value in tests reading movies data

    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.

        Gliffy Diagrams

          Attachments

          1. 06-psql.png
            205 kB
            Cheng Fang
          2. Screenshot-2017-10-1 OpenShift Web Console.png
            242 kB
            Cheng Fang

            Activity

              People

              • Assignee:
                cfang Cheng Fang
                Reporter:
                cfang Cheng Fang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: