File tree Expand file tree Collapse file tree
modules/jooby-trpc-generator
src/main/java/io/jooby/trpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 <dependency >
2121 <groupId >io.github.classgraph</groupId >
2222 <artifactId >classgraph</artifactId >
23- <version >6 .0.0</version >
23+ <version >5 .0.0</version >
2424 </dependency >
2525
2626 <dependency >
2727 <groupId >cz.habarta.typescript-generator</groupId >
2828 <artifactId >typescript-generator-core</artifactId >
29- <version >4.1 .1</version >
29+ <version >4.2 .1</version >
3030 </dependency >
3131
3232 <!-- Test dependencies -->
Original file line number Diff line number Diff line change 2121import java .util .Map ;
2222import java .util .Set ;
2323
24+ import org .jspecify .annotations .NonNull ;
2425import org .slf4j .Logger ;
2526import org .slf4j .LoggerFactory ;
2627
@@ -80,7 +81,7 @@ public class TrpcGenerator {
8081
8182 private final Logger log = LoggerFactory .getLogger (getClass ());
8283
83- private ClassLoader classLoader = getClass ().getClassLoader ();
84+ private @ NonNull ClassLoader classLoader = getClass ().getClassLoader ();
8485 private Path outputDir ;
8586 private String outputFile = "trpc.d.ts" ;
8687
@@ -499,16 +500,13 @@ private Set<Class<?>> discoverControllers() {
499500 .enableClassInfo ()
500501 .enableAnnotationInfo ()
501502 .enableMethodInfo ()
502- .ignoreClassVisibility ();
503-
504- if (classLoader != null ) {
505- classGraph .overrideClassLoaders (classLoader );
506- }
503+ .ignoreClassVisibility ()
504+ .enableClassLoaders (classLoader );
507505
508506 try (var scanResult = classGraph .scan ()) {
509507 for (var classInfo : scanResult .getAllClasses ()) {
510508 try {
511- var clazz = classInfo .loadClass ( false ); // loads without initializing!
509+ var clazz = Class . forName ( classInfo .getName (), false , classLoader );
512510
513511 if (isTrpcAnnotated (clazz )) {
514512 controllers .add (clazz );
Original file line number Diff line number Diff line change 6161 <handlebars .version>4.5.5</handlebars .version>
6262 <jstachio .version>1.3.7</jstachio .version>
6363 <pebble .version>4.1.2</pebble .version>
64- <jackson .version>2.22.3 </jackson .version>
65- <jackson3 .version>3.2.3 </jackson3 .version>
64+ <jackson .version>2.22.4 </jackson .version>
65+ <jackson3 .version>3.2.4 </jackson3 .version>
6666 <gson .version>2.14.0</gson .version>
6767 <jakarta .json.bind-api.version>3.0.4</jakarta .json.bind-api.version>
6868 <yasson .version>3.0.5</yasson .version>
You can’t perform that action at this time.
0 commit comments