簡體   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