Re: [groovy-user] Deprecation of DefaultGroovyMethods.consumeProcessOutput()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] Deprecation of DefaultGroovyMethods.consumeProcessOutput()

Paul King

This sounds like an Eclipse bug.

Using the DGM#consumeProcessOutput() method directly isn't
part of the published api of Groovy but we have found in the
past that some frameworks took the liberty of calling such methods
so we flag them using deprecated when we do file/package moves.
This should be totally transparent to you. Eclipse should skip
deprecated methods when determining DGM enhancements.

Cheers, Paul.

On 25/06/2011 5:51 PM, Bogdan Calmac wrote:

> In 1.8.0, the GDK method DefaultGroovyMethods.consumeProcessOutput() is
> deprecated and defined as follows:
>
>      /**
>       * @deprecated use ProcessGroovyMethods#consumeProcessOutput(Process,
> Appendable, Appendable)
>       */
>      @Deprecated
>      public static void consumeProcessOutput(Process self, StringBuffer
> output, StringBuffer error) {
>          ProcessGroovyMethods.consumeProcessOutput(self, output, error);
>      }
>
> and therefore I get a warning in Eclipse about using deprecated methods when
> writing something like:
>
>      process.consumeProcessOutput(System.out, System.err)
>
> Now, the handling of this invocation is internal to groovy. I cannot switch
> from using DefaultGroovyMethods to ProcessGroovyMethods, my code above is
> the same.
>
> How should this be addressed? Is this just a fault of the groovy eclipse
> plugin? Are the ProcessGroovyMethods actually wired correctly and the
> runtime invocation goes directly to ProcessGroovyMetohds?
>
> If so, why weren't the specific methods in DefaultGroovyMethods removed
> completely? They are not called directly by the user code and there would be
> no break in the API. As it looks, this was a refactoring to keep
> process-related methods in their own file.
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/Deprecation-of-DefaultGroovyMethods-consumeProcessOutput-tp4523216p4523216.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email