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

建议在APIJSON中定义 UnsupportedDataTypeException 类代替 javax.activation.UnsupportedDataTypeException #488

Closed
cnscoo opened this issue Dec 14, 2022 · 1 comment · Fixed by #489
Labels
help wanted 请求帮助

Comments

@cnscoo
Copy link
Contributor

cnscoo commented Dec 14, 2022

Description

原因

APIJSON 代码里面引用了 javax.activation.UnsupportedDataTypeException 类,对应的包是 javax.activation:activation:1.1.1,最近有个项目用的是JDK17,JDK17中对应的包和类前缀均改为了jakarta,而 APIJSON 引用这个包唯一用到的就是 javax.activation.UnsupportedDataTypeException,所以建议在 APIJSON 中定义一个 UnsupportedDataTypeException 类代替 javax.activation.UnsupportedDataTypeException 类。

操作

  • javax.activation.UnsupportedDataTypeException 类复制一份到 APIJSON 的 apijson.orm.exception 包里面去
  • 将 APIJSON 中对javax.activation.UnsupportedDataTypeException的引用全部替换为apijson.orm.exception.UnsupportedDataTypeException
  • 移除 APIJSON 的 pom.xml 文件中的 javax.activation:activation:1.1.1 依赖。

好处

  • 可以不用再考虑对JavaEE和Jakarta的不兼容
  • 减少依赖包
@TommyLemon
Copy link
Collaborator

赞,很好的建议,感谢反馈问题和建议。
如果能帮忙贡献下代码就更好了,开源要大家一起参与贡献才会更美好~
image

提 PR 贡献代码的步骤可参考:
https://github.com/Tencent/APIJSON/blob/master/CONTRIBUTING.md#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%80%E5%AE%9A%E8%A6%81%E8%B4%A1%E7%8C%AE%E4%BB%A3%E7%A0%81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 请求帮助
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants