DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Duplicated EventHandler Registration on the Generic method #1549

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
abstract class baseclass<T>
{
    public abstract void onChange1(configclass p);

    public abstract void onChange2(T p);
}

class childclassforeventbus extends baseclass<configclass> 
{
    @Override
    public void onChange1(configclass p)
    {
    }

    @Override  @Subscribe
    public void onChange2(configclass p)
    {
    }
}

If register a generice event handler, it will automatically register 2 
handlers, the actual handler and raw type handler, "onChange2(configclass)" & 
"onChange2(Object)". 

Should enhance the "findAllHandlers" to bypass the raw type handler. Otherwise, 
the generic handler will be called twice!

Original issue reported on code.google.com by dreamer...@gmail.com on 4 Oct 2013 at 8:04

GoogleCodeExporter commented 9 years ago
Issue 1769 has been merged into this issue.

Original comment by cpov...@google.com on 5 Jun 2014 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 5 Jun 2014 at 8:38

GoogleCodeExporter commented 9 years ago
As noted elsewhere, this issue is specific to JDK8: method annotations are 
included on bridge methods where they weren't previously.

Original comment by cgdecker@google.com on 5 Jun 2014 at 10:11

GoogleCodeExporter commented 9 years ago
Fixed internally; should be mirrored out soon.

Original comment by cgdecker@google.com on 6 Jun 2014 at 4:47

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08