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

使用 Mybatis Scanner 扫描的 xml 为空文件时,Scanner panic #61

Closed
sjjian opened this issue Nov 4, 2021 · 3 comments
Closed
Assignees
Labels
bug Something isn't working verified the issue all pr is verified
Milestone

Comments

@sjjian
Copy link
Member

sjjian commented Nov 4, 2021

SQLe Version
v1.2110.0.pre1

Describe the bug
使用 Mybatis Scanner 扫描的 xml 为空文件时,Scanner panic:
image

To Reproduce
Steps to reproduce the behavior:

  1. 创建一个空的xml文件,例如:sql.xml,内不含任何内容,放入某个文件夹下;
  2. 创建审核计划,并通过scanner 指定该文件夹上传;
  3. 执行报错

Expected behavior
期望为空时不上传

@sjjian sjjian added the bug Something isn't working label Nov 4, 2021
@sjjian sjjian added this to the v1.2111.0 milestone Nov 4, 2021
@sjjian sjjian self-assigned this Nov 4, 2021
@sjjian
Copy link
Member Author

sjjian commented Nov 15, 2021

原因:

Mybatis XML解析库未处理匹配不到Mybatis 内容的情况,未对解析的内容判空处理导致后续引用空指针

@Marcus9530
Copy link
Collaborator

"release-1.2111.x 5d24144"
验证通过
验证步骤:
1.gitlab上创建一个空文件
image
2.sqle上创建审核计划然后,配置jenkins和gitlab,触发gitlab变更,然后查看jenkins输出
image
3.jeknins输出台信息没有出现panic信息,查看sqled日志也没有panic信息
image
image

@Marcus9530 Marcus9530 added the verified the issue all pr is verified label Nov 26, 2021
@Marcus9530
Copy link
Collaborator

复现版本:
sqle-1.2109.0_6a6de329f50bba5d61a880e1
复现步骤;
1.gitlab上创建一个空文件
2.sqle上创建审核计划然后,配置jenkins和gitlab,触发gitlab变更,然后查看jenkins输出,看到启动scanner失败且出现panic信息

image

image

taolx0 pushed a commit that referenced this issue Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified the issue all pr is verified
Projects
None yet
Development

No branches or pull requests

2 participants