简体   繁体   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

Thanks in advance.提前致谢。 I am searching for a long time on the net.我在网上找了很久。 But no use.但是没有用。 Please help or try to give some ideas how to achieve this.请帮助或尝试提供一些想法如何实现这一点。

Solution can be found here for the error.可以在此处找到该错误的解决方案。

DefaultHttpClient is deprecated, you can this solution here to import the Java HttpClient. 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.

相关问题 如何在 IntelliJ IDEA 中修复“不支持的 class 文件主要版本 60”? - How can I fix "unsupported class file major version 60" in IntelliJ IDEA? 如何在 Intellij IDEA 中找到注释的处理器类? - How to find Processor class of an annotation in Intellij IDEA? 在 Intellij IDEA 的 Jar 文件中找不到类 - Class not found in Jar File in Intellij IDEA 我无法运行Intellij Idea创建的类文件吗? - What i can't run a class file created Intellij Idea? 如何在IntelliJ IDEA中构建Apache POI - How can build Apache POI in IntelliJ IDEA 如何修复org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping中未找到类的异常? - How Can I Fix a Class Not Found Exception From org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping? 如何解决 IntelliJ 上的“未找到驱动程序类 'org.apache.hive.jdbc.HiveDriver'”? - How to solve "Driver class 'org.apache.hive.jdbc.HiveDriver' not found" on IntelliJ? 如何禁用在IntelliJ IDEA中显示Spring @Value注释的值? - How can I disable showing the value of a Spring @Value annotation in IntelliJ IDEA? 如何在IntelliJ IDEA中将xml文件添加到类路径中? - How can I add xml file to the classpath in intelliJ IDEA? 如何修复或更正 IntelliJ Idea 中的“默认文件模板”警告 - How do I fix or correct the “Default File Template” warning in IntelliJ Idea
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM