The primary issue is a disagreement about the necessity to preserve the method signatures in the task since the current behaviour relies on the IntrospectionHelper's use of a deprecated constructor which is a risk

The ChangeLogTask uses

        setStart (Date date)
        setEnd (Date date)

for the start and end attributes. The IntrospectionHelper uses Date's String argument constructor to invoke these setters. However, Date(String) has been deprecated for a very long time.

I submitted a patch for ChangeLogTask that added a "datePattern" attribute, which takes a SimpleDateFormat pattern to be used in parsing the "start" and "end" attributes. I modified the signatures to be

        setStart (String date)
        setEnd (String date)

and used the input pattern to parse them or report an error.

When the patch was committed, the original signatures were back, and two new attributes were added:

        setStart (Date date)
        setEnd (Date date)
        setStartDate (String date)
        setEndDate (String date)

The justification for the new parameters is maintaining the interface for any extensions of the ChangeLogTask. I don't think the class is very amenable to subclassing (all the interesting methods and attributes are private), and continuing to depend on the IntrospectionHelper's use of a deprecated API seems risky.

I was leaning toward a minimal impact on the "user's" interface (a single new attribute); Conor is leaning toward minimal impact on the "developer's" interface (maintain the original signatures).

So Conor pulled the patch, pending a discussion of the issues.



        Ken

At 08:14 AM 2/21/2003 +0100, you wrote:
On 21 Feb 2003, <[EMAIL PROTECTED]> wrote:
> conor       2003/02/20 16:19:22
>
>   Modified:    src/main/org/apache/tools/ant/taskdefs/cvslib Tag:
>                         ANT_15_BRANCH ChangeLogTask.java
>   Log:
>   Roll back

what has been the problem?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to