Skip to content

Commit

Permalink
Initialize the class to register first
Browse files Browse the repository at this point in the history
  • Loading branch information
essobedo committed Dec 15, 2022
1 parent d7bbed3 commit ccee464
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ void generateReflectConfig(BuildProducer<GeneratedResourceBuildItem> reflectConf

JsonArrayBuilder root = Json.array();
for (Map.Entry<String, ReflectionInfo> entry : reflectiveClasses.entrySet()) {
try {
Class.forName(entry.getKey(), true, Thread.currentThread().getContextClassLoader());
} catch (Throwable e) {
// skip me
continue;
}
JsonObjectBuilder json = Json.object();

json.put("name", entry.getKey());
Expand All @@ -73,7 +79,7 @@ void generateReflectConfig(BuildProducer<GeneratedResourceBuildItem> reflectConf
if (info.weak) {
json.put("condition", Json.object().put("typeReachable", entry.getKey()));
} else if (info.typeReachable != null) {
json.put("condition", Json.object().put("typeReachable", info.typeReachable));
// json.put("condition", Json.object().put("typeReachable", info.typeReachable));
}
if (info.constructors) {
json.put("allDeclaredConstructors", true);
Expand Down

0 comments on commit ccee464

Please sign in to comment.