Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复SolonApp的source参数空指针校验 #285

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions solon/src/main/java/org/noear/solon/SolonApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ public SolonProps cfg() {
}

protected SolonApp(Class<?> source, NvMap args) throws Exception {
//添加启动类检测
if (source == null) {
throw new IllegalArgumentException("The startup class parameter('source') cannot be null");
}
_startupTime = System.currentTimeMillis();
_source = source;
_sourceLocation = source.getProtectionDomain().getCodeSource().getLocation();
_converterManager = new ConverterManager();

//添加启动类检测
if (source == null) {
throw new IllegalArgumentException("The startup class parameter('source') cannot be null");
}

//添加启动类包名检测
if (source.getPackage() == null || Utils.isEmpty(source.getPackage().getName())) {
Expand Down