DataflowQueue#chainWith bug (?) [gpars 1.0.0]

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Paolo Di Tommaso
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo


Reply | Threaded
Open this post in threaded view
|

Re: DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Paolo Di Tommaso
Hi, 

Actually I've submitted a pull request for it 



Cheers,
Paolo



On Sat, Oct 26, 2013 at 11:12 PM, Paolo Di Tommaso <[hidden email]> wrote:
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo



Reply | Threaded
Open this post in threaded view
|

Re: DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Vaclav
Administrator
Thank you, Paolo, for spotting and fixing the issue.

I've just merged in the fix.

Cheers,

Vaclav



On Mon, Oct 28, 2013 at 12:51 AM, Paolo Di Tommaso <[hidden email]> wrote:
Hi, 

Actually I've submitted a pull request for it 



Cheers,
Paolo



On Sat, Oct 26, 2013 at 11:12 PM, Paolo Di Tommaso <[hidden email]> wrote:
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo






--
E-mail: [hidden email]
Blog: http://www.jroller.com/vaclav
Linkedin page: http://www.linkedin.com/in/vaclavpech
Reply | Threaded
Open this post in threaded view
|

Re: DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Paolo Di Tommaso
Good!

Looking forward to see a new GPars patch release. 

Cheers, 
Paolo



On Mon, Oct 28, 2013 at 10:48 AM, Václav Pech <[hidden email]> wrote:
Thank you, Paolo, for spotting and fixing the issue.

I've just merged in the fix.

Cheers,

Vaclav



On Mon, Oct 28, 2013 at 12:51 AM, Paolo Di Tommaso <[hidden email]> wrote:
Hi, 

Actually I've submitted a pull request for it 



Cheers,
Paolo



On Sat, Oct 26, 2013 at 11:12 PM, Paolo Di Tommaso <[hidden email]> wrote:
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo






--
E-mail: [hidden email]
Blog: http://www.jroller.com/vaclav
Linkedin page: http://www.linkedin.com/in/vaclavpech

Reply | Threaded
Open this post in threaded view
|

Re: DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Paolo Di Tommaso
In reply to this post by Vaclav
Hi Václav, 

In the case you missed it, I've submitted another patch about this 



Cheers,
Paolo



On Mon, Oct 28, 2013 at 10:48 AM, Václav Pech <[hidden email]> wrote:
Thank you, Paolo, for spotting and fixing the issue.

I've just merged in the fix.

Cheers,

Vaclav



On Mon, Oct 28, 2013 at 12:51 AM, Paolo Di Tommaso <[hidden email]> wrote:
Hi, 

Actually I've submitted a pull request for it 



Cheers,
Paolo



On Sat, Oct 26, 2013 at 11:12 PM, Paolo Di Tommaso <[hidden email]> wrote:
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo






--
E-mail: [hidden email]
Blog: http://www.jroller.com/vaclav
Linkedin page: http://www.linkedin.com/in/vaclavpech

Reply | Threaded
Open this post in threaded view
|

Re: DataflowQueue#chainWith bug (?) [gpars 1.0.0]

Vaclav
Administrator
Thank you, Paolo. I will merge later today.

Vaclav




On Wed, Oct 30, 2013 at 9:51 AM, Paolo Di Tommaso <[hidden email]> wrote:
Hi Václav, 

In the case you missed it, I've submitted another patch about this 



Cheers,
Paolo



On Mon, Oct 28, 2013 at 10:48 AM, Václav Pech <[hidden email]> wrote:
Thank you, Paolo, for spotting and fixing the issue.

I've just merged in the fix.

Cheers,

Vaclav



On Mon, Oct 28, 2013 at 12:51 AM, Paolo Di Tommaso <[hidden email]> wrote:
Hi, 

Actually I've submitted a pull request for it 



Cheers,
Paolo



On Sat, Oct 26, 2013 at 11:12 PM, Paolo Di Tommaso <[hidden email]> wrote:
Hello, 


I think I've found a bug in the following method: 


    @Override
    public <V> DataflowReadChannel<V> chainWith(final PGroup group, final Map<String, Object> params, final Closure<V> closure) {
        final DataflowQueue<V> result = new DataflowQueue<V>();
        final Map<String, Object> parameters = new HashMap<String, Object>(params);
        parameters.put("inputs", asList(this));
        parameters.put("outputs", asList(asList(result)));

        group.operator(parameters, new ChainWithClosure<V>(closure));
        return result;
    }


The output result queue is wrapped two times with a list, producing an exception at runtime. 


Cheers,
Paolo






--
E-mail: [hidden email]
Blog: http://www.jroller.com/vaclav
Linkedin page: http://www.linkedin.com/in/vaclavpech




--
E-mail: [hidden email]
Blog: http://www.jroller.com/vaclav
Linkedin page: http://www.linkedin.com/in/vaclavpech