I also don't think it belongs in a testing module. OTOH, I appreciate the
desire not to have such hang around in finished code. I think I might
create a dedicated project around this (elsewhere) with a Maven plugin to
provide safeguards around unfinished uses of Todo.

Thanks for considering this,
Matt

On Mar 16, 2018 6:09 AM, "Gilles" <gil...@harfang.homelinux.org> wrote:

> On Fri, 16 Mar 2018 00:35:24 -0700, Bindul Bhowmik wrote:
>
>> On Thu, Mar 15, 2018 at 4:05 PM, Gilles <gil...@harfang.homelinux.org>
>> wrote:
>>
>>> Hi.
>>>
>>> On Wed, 14 Mar 2018 16:51:43 -0500, Matt Benson wrote:
>>>
>>>>
>>>> I have often thought about creating a utility class that allows me to
>>>> write
>>>> skeletal code that still compiles but will remind me to go back and
>>>> finish
>>>> it. This is a weird meta area of programming, but here are some basic
>>>> usage
>>>> examples:
>>>>
>>>> Foo foo = Todo.todo(); //returns null
>>>> Bar bar = Todo.todo(THROWING_EXCEPTION); //throws
>>>> NotImplementedException
>>>> Baz baz = Todo.todo(RETURNING_NULL, "create a Baz"); //returns null and
>>>> prints a message to System.err
>>>>
>>>> I would also think it a good (if odd) idea to make the whole class
>>>> deprecated so that its use is flagged in tools, etc.
>>>>
>>>> Does the community think this code would be suited to the commons-lang
>>>> component?
>>>>
>>>
>>>
>>> Perhaps "Commons Testing".
>>> IIUC, such calls are not meant to appear in released code.
>>>
>>
>> I would recommend against commons testing. i would assume that
>> component would be a dependency with a test scope in most projects,
>> making it impossible to use it in the main code.
>>
>
> That is the feature: when about to release, all "Commons Testing"
> modules must be in "test" scope, and if they are used in "main",
> compilation will fail.
> In development, "main" would depend on "Commons Testing" to allow
> usage of "Todo".
>
> Gilles
>
> Regards,
>> Bindul
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to