Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HK2 AbstractBinders are configured twice #4256

Closed
jeloba opened this issue Sep 11, 2019 · 0 comments
Closed

HK2 AbstractBinders are configured twice #4256

jeloba opened this issue Sep 11, 2019 · 0 comments
Assignees
Labels
bug Something isn't working hk2
Milestone

Comments

@jeloba
Copy link

jeloba commented Sep 11, 2019

Since version 2.29 HK2 AbstractBinders are configured twice when registered directly in the application configuration. The following test demonstrates the issue:

public class HK2BinderTest extends JerseyTest
{
    @Override
    protected Application configure()
    {
        final ResourceConfig config = new ResourceConfig();

        config.register(new AbstractBinder()
        {
            private int counter = 0;

            @Override
            protected void configure()
            {
                assertThat(counter++, is(0));
            }
        });

        return config;
    }

    @Test
    public void test()
    {
    }
}

Expected behavior would be only one call to AbstractBinder.configure().

@jansupol jansupol added hk2 bug Something isn't working labels Sep 19, 2019
@jansupol jansupol added this to the 2.29.2 milestone Sep 20, 2019
@jansupol jansupol self-assigned this Sep 20, 2019
@jansupol jansupol modified the milestones: 2.29.2, 2.30 Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hk2
Projects
None yet
Development

No branches or pull requests

2 participants