Menu

#10 [DefaultTestingStrategy] eliminating prefix constraint

open
nobody
None
5
2003-03-17
2003-03-17
No

Hi.
This is not exactly a feature request, but more like a
request for a minor enhancement:

Change DefaultTestingStrategy.ACCESSOR_STARTS_WITH to
be not final.

Explanation/Reason:

In our projects we are usually obliged to adhere to the
coding conventions of a given company, which is good.

If, for example, in some company getter/setter methods
are expected to begin like this "SET/GET", or this
"set_/get_", we are in trouble. Because unfortunately,
the 2-dimensional string array ACCESSOR_STARTS_WITH,
which holds the getter/setter prefix-pairs, is declared
final.
So, for now, I just patched the class to include the
missing prefix pairs.

But that's not nice in several aspects:
1) JUnitDoclet already offers the runtime option
-testing which would allow the use of a custom testing
strategy
2) need to patch DefaultTestingStrategy on every
version update of JUnitDoclet
3) doesn't simply extend DefaultTestingStrategy once
and for all

Cheers,
Joerg

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.