We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, 我发现在org.nutz.mvc.impl.Loadings的第121行处对ioc的直接解析可能会导致NPE错误,如下:
org.nutz.mvc.impl.Loadings
public static Set<Class<?>> scanModules(Ioc ioc, Class<?> mainModule, EntryDeterminer determiner) { Modules ann = mainModule.getAnnotation(Modules.class); for (String str : ann.by()) { if (str.startsWith("ioc:")) { ms = ioc.get(ModuleScanner.class, nm);// 可能发生NPE错误。 } }
传递的null值在NutLoading的第87行,返回值可能为空。
NutLoading
ioc = createIoc(config, mainModule);
希望这个建议对你们有帮助!!
The text was updated successfully, but these errors were encountered:
但总得抛出异常吧
Sorry, something went wrong.
方案一:检查ioc为null时,输出warning信息,并退出。 方案二:检查ioc为null时,输出warning信息,不进行解引用,继续跑程序。 方案三:检查ioc为null时,不输出warning信息,不进行解引用,继续跑程序。
No branches or pull requests
Hello,
我发现在
org.nutz.mvc.impl.Loadings
的第121行处对ioc的直接解析可能会导致NPE错误,如下:传递的null值在
NutLoading
的第87行,返回值可能为空。希望这个建议对你们有帮助!!
The text was updated successfully, but these errors were encountered: