Skip to content

jooby-avaje-inject wrong or confusing behavior #3815

@ogrammer

Description

@ogrammer

I am using jooby-avaje-inject, and I noticed AvajeInjectModule returns true in lateinit. This causes me to not be able to use jooby's require() to get my mvc controller classes.

I am trying to install the mvc controllers in the code of the Jooby subclass after installing the avaje inject module, but this exception happens:

throw new RegistryException("Service not found: " + key);

I believe the exception message is incorrect or at least confusing because on the condition !registry.isSet() it throws "service not found: class name". I think it should be "registry is not set" instead.

When I make a subclass of AvajeInjectModule and override lateinit to return false, the code works without issue.

Is the problem in the module or am I using require() incorrectly in a wrong place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions