Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-3233

last change to uima-build-helper-maven-plugin broke it in 2 ways

    XMLWordPrintableJSON

Details

    Description

      The last change to this plugin was 2 things:

      1) Change from using javadoc style annotations to Java 5 annotations
      2) accidentally introduce a bug that broke date formatting

      1) is broken - didn't follow the docs for how to do the Java 5 style, and as a result, the "phase" in which to run this was not specified - causing it to be skipped.

      2) If you forced this to run, it generated an exception trying to convert an object to a date. This was because a cast to (Object) was inserted in the method call:
      MessageFormat.format("

      {0,date," + ps.getFormat() + "}

      ", (Object) now);

      The "format" method has a signature of (String, Object ...). Casting the "now" value (which is an array of 1 Object) to (Object) made Java pass an array, the first element of which was an array of one object.

      The correct cast is (Object[]). The reason this was inserted is because Eclipse issued a warning, which I didn't read correctly (was speed reading ).

      Probably need to check all other "improvements" to use Java 5 annotations for maven annotations, to correct others also done incorrectly.

      Attachments

        Activity

          People

            schor Marshall Schor
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: