diff --git a/modules/jooby-avaje-inject/src/main/java/io/jooby/avaje/inject/JoobyPropertyPlugin.java b/modules/jooby-avaje-inject/src/main/java/io/jooby/avaje/inject/JoobyPropertyPlugin.java index 54b16d28a5..e860473a0f 100644 --- a/modules/jooby-avaje-inject/src/main/java/io/jooby/avaje/inject/JoobyPropertyPlugin.java +++ b/modules/jooby-avaje-inject/src/main/java/io/jooby/avaje/inject/JoobyPropertyPlugin.java @@ -22,8 +22,8 @@ public JoobyPropertyPlugin(Config config) { @Override public Optional get(String property) { return config.hasPath(property) - ? Optional.empty() - : Optional.ofNullable(config.getString(property)); + ? Optional.of(config.getString(property)) + : Optional.empty(); } @Override