繁体   English   中英

找不到 org.apache.http.annotation.NotThreadSafe 的类文件,我该如何在 Intellij 想法上修复它?

[英]class file of org.apache.http.annotation.NotThreadSafe not found,how can i fix it on intellij idea?

message:javac 1.8.0_172 was used to compile java sources
error:java: 
Inaccessible org.apache.http.annotation.NotThreadSafe
Can not found class file of org.apache.http.annotation.NotThreadSafe

C:...\common\HttpUtils.java 
warn:java:
org.apache.http.impl.client's org.apache.http.impl.client.DefaultHttpClient is obsolete

提前致谢。 我在网上找了很久。 但是没有用。 请帮助或尝试提供一些想法如何实现这一点。

可以在此处找到该错误的解决方案。

DefaultHttpClient 已弃用,您可以在此解决方案中导入 Java HttpClient。

根据所述@NotThreadSafe注释应改为@Contract (threading = org.apache.http.annotation.ThreadingBehavior.UNSAFE)它使用org.apache.http.annotation.Contract

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM