You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/01/17 20:54:11 UTC

DO NOT REPLY [Bug 48560] New: FormatterElement have non-public accessors

https://issues.apache.org/bugzilla/show_bug.cgi?id=48560

           Summary: FormatterElement have non-public accessors
           Product: Ant
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Optional Tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: alexey.v.varlamov@gmail.com


There are unjustified non-public accessor methods in
org.apache.tools.ant.taskdefs.optional.junit.FormatterElement class. Namely,
getUseFile() and setOutfile(), which apparently should be public.
Otherwise they hinder reuse/subclassing of JUnitTestRunner.

As a side note, the junit task appears to be quite stiff, not suited for
extensions. Most evident case, replacing the default JUnitTestRunner with
custom one (e.g. to support fancy JUnit4 features) is nearly impossible w/o
repackaging the whole bunch of classes from that package - too many private or
package methods and spaghetti-style dependencies.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48560] FormatterElement have non-public accessors

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48560

--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2010-01-17 21:25:45 UTC ---
Well, the JUnit task looks like code looks that got features added for almost
ten years with the constraint to not break backwards compatibility.  It has
never been designed to be subclassed, but people did so anyway (e.g. Cactus)
and in fact this further constrained the changes that could be made.

As for JUnit4, we've been discussing (with the JUnit people, actually) to
create a new junit4 task for years now, but in the end the existing task seems
to work well enough for most people so the re-write never took off.

If we changed setOutfile the <formatter> element suddenly gains a new
attribute, something I wouldn't want to do before 1.8.0 is final (too late in
the release cycle for anything but bug fixes).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.