Skip to content

Commit

Permalink
fix: re-add scanning classpath from property java.class.path
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Apr 26, 2023
1 parent 1a06a21 commit 1ffb48f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/jrpc/clightning/plugins/CLightningPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
*/
package jrpc.clightning.plugins;

import com.google.common.collect.ImmutableSet;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.annotations.Expose;
import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.*;
import jrpc.clightning.annotation.Hook;
import jrpc.clightning.annotation.PluginOption;
Expand Down Expand Up @@ -68,7 +70,11 @@ public abstract class CLightningPlugin implements ICLightningPlugin {
private final Reflections reflections =
new Reflections(
new ConfigurationBuilder()
.setUrls(ClasspathHelper.forClassLoader())
.setUrls(
ImmutableSet.<URL>builder()
.addAll(ClasspathHelper.forJavaClassPath())
.addAll(ClasspathHelper.forClassLoader())
.build())
.setScanners(Scanners.MethodsAnnotated, Scanners.FieldsAnnotated));

public CLightningPlugin() {
Expand Down

0 comments on commit 1ffb48f

Please sign in to comment.