Skip to content

Commit ae2d58c

Browse files
committed
Refactor performance of isVerbose
Relates to quarkusio/quarkus#31355
1 parent 5f73d25 commit ae2d58c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/main/java/io/dekorate/utils/Development.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@
2323
*/
2424
public final class Development {
2525

26+
private static final boolean IS_VERBOSE = Session.getSession()
27+
.getConfigurationRegistry().get(GeneratorConfig.class).map(GeneratorConfig::isVerbose)
28+
.orElse(false);
29+
2630
private Development() {
2731
//Utility class
2832
}
2933

3034
public static boolean isVerbose() {
31-
return Session.getSession().getConfigurationRegistry().get(GeneratorConfig.class).map(GeneratorConfig::isVerbose)
32-
.orElse(false);
35+
return IS_VERBOSE;
3336
}
3437
}

0 commit comments

Comments
 (0)