Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Yoann Rodière <yoann@hibernate.org>
  • Loading branch information
mkouba and yrodiere authored Oct 2, 2023
1 parent 97e8a56 commit 02b4703
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ static void verifyCurrentImageMode(Set<String> buildAndRunTimeFixed) {
b.append("\nPOSSIBLE CONFIG INJECTION PROBLEM DETECTED\n");
b.append("-".repeat(120));
b.append("\nA config object was injected during the static initialization phase of a native image build.\n");
b.append(
"This may result in unexpected errors.\n");
b.append("This may result in unexpected errors.\n");
b.append("The injected value was obtained at native image build time and cannot be updated at runtime.\n\n");
if (injectionPoint != null) {
b.append("Injection point: ");
Expand All @@ -81,9 +80,9 @@ static void verifyCurrentImageMode(Set<String> buildAndRunTimeFixed) {
b.append(NativeBuildTime.class.getName());
b.append(" to eliminate the false positive\n");
b.append(
"\t- You can leverage the programmatic lookup to delay the injection of a config property; for example '@ConfigProperty(name = \"foo\") Instance<String> foo'\n");
"\t- You can leverage the programmatic lookup to delay the retrieval of a config property; for example '@ConfigProperty(name = \"foo\") Instance<String> foo'\n");
b.append(
"\t- You can try to use a normal CDI scope to initialize the bean lazily; this may help if the is only injected but not directly used during the static initialization phase");
"\t- You can try to assign a normal CDI scope (e.g. @ApplicationScoped) to the bean to initialize it lazily; this may help if the bean is only injected but not directly used during the static initialization phase");
b.append("\n");
b.append("=".repeat(120));
b.append("\n\n");
Expand Down

0 comments on commit 02b4703

Please sign in to comment.