Marshall Schor created UIMA-3233:
------------------------------------

             Summary: last change to uima-build-helper-maven-plugin broke it in 
2 ways
                 Key: UIMA-3233
                 URL: https://issues.apache.org/jira/browse/UIMA-3233
             Project: UIMA
          Issue Type: Bug
          Components: Build, Packaging and Test
    Affects Versions: parent-pom-6
            Reporter: Marshall Schor
            Assignee: Marshall Schor
             Fix For: parent-pom-7


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.
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to