Skip to content

Commit 4e6c811

Browse files
@initial 7.0.0-preview.423.1 Fix injection and add scan constructor null tip
1 parent 311689c commit 4e6c811

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/com/talexframe/frame/core/modules/plugins/addon/PluginScanner.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ public void scan() {
149149

150150
tframe.crash( e.getCause() );
151151

152+
} catch ( IllegalArgumentException e ) {
153+
154+
log.error("[PluginScanner] PluginCompAdapter inject failed | For constructors: {}", (Object) constructors);
155+
log.error("[PluginScanner] Oh, some possible solution: Please set the constructor params for null at " + clazz.getName());
156+
157+
tframe.crash( e.getCause() );
158+
152159
}
153160

154161
}

src/main/java/com/talexframe/frame/core/modules/repository/TRepoManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.talexframe.frame.core.talex.TFrame;
88
import lombok.Getter;
99
import lombok.SneakyThrows;
10+
import lombok.extern.slf4j.Slf4j;
1011

1112
import java.lang.reflect.Field;
1213
import java.util.concurrent.ConcurrentHashMap;
@@ -19,6 +20,7 @@
1920
* @date 2022/1/20 17:01 <br /> Project: TalexFrame <br />
2021
*/
2122
@Getter
23+
@Slf4j
2224
public class TRepoManager {
2325

2426
private static TRepoManager manager;
@@ -121,7 +123,10 @@ public boolean registerRepo(WebPlugin plugin, TRepo Repo) {
121123
}
122124

123125
try {
126+
124127
field.set(Repo, tRep);
128+
log.debug("Inject Repo - " + repClz.getName() + " - " + clz.getName());
129+
125130
} catch ( IllegalAccessException e ) {
126131
e.printStackTrace();
127132
}

0 commit comments

Comments
 (0)