!16 fix:getProcessorNull

Merge pull request !16 from tzk007/main
This commit is contained in:
MaxKeyTop 2022-10-25 05:45:24 +00:00 committed by Gitee
commit a5c4caf3a1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -202,14 +202,14 @@ public class InitializeContext extends HttpServlet {
}
_logger.debug("APP_HOME" + " = {}" , PathUtils.getInstance().getAppPath());
Processor.Type processorType = ArchUtils.getProcessor().getType();
if (Objects.isNull(processorType)){
processorType = Processor.Type.UNKNOWN;
Processor processor = ArchUtils.getProcessor();
if (Objects.isNull(processor)){
processor = new Processor(Processor.Arch.UNKNOWN, Processor.Type.UNKNOWN);
}
_logger.debug("OS : {}({} {}), version {}",
SystemUtils.OS_NAME,
SystemUtils.OS_ARCH,
processorType,
processor.getType(),
SystemUtils.OS_VERSION
);