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

LoggerImpl.java中的三元表达式的两个分支使用了完全相同的返回结果 #227

Open
gadfly3173 opened this issue Jun 28, 2021 · 3 comments

Comments

@gadfly3173
Copy link
Contributor

描述 bug

@Override
public void handle(PermissionMeta meta, Logger logger, HttpServletRequest request, HttpServletResponse response) {
String template = logger.template();
UserDO user = LocalUser.getLocalUser();
template = this.parseTemplate(template, user, request, response);
String permission = "";
if (meta != null) {
permission = !StringUtils.hasLength(meta.value()) ? meta.value() : meta.value();
}
Integer userId = user.getId();

Line44,三元表达式的两个分支使用了完全相同的返回结果

你使用哪个版本出现该问题?

master

@ElanYoung
Copy link

正确的应该是什么呢

@gadfly3173
Copy link
Contributor Author

正确的应该是什么呢

好问题 这个本来应该是处理原来的合并注解时的判空处理,现在应该不需要这个判空了。。。不过这只有原来的设计者才知道想怎么改了

@ElanYoung
Copy link

正确的应该是什么呢

好问题 这个本来应该是处理原来的合并注解时的判空处理,现在应该不需要这个判空了。。。不过这只有原来的设计者才知道想怎么改了

强迫症哈哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants