1414import com .intellij .openapi .progress .ProgressIndicator ;
1515import com .intellij .openapi .progress .Task ;
1616import com .intellij .openapi .project .Project ;
17- import com .intellij .openapi .ui .Messages ;
1817import com .intellij .util .Consumer ;
1918import org .apache .commons .lang3 .StringUtils ;
2019import org .apache .http .NameValuePair ;
21- import org .apache .http .client .methods .CloseableHttpResponse ;
2220import org .apache .http .client .methods .HttpPost ;
2321import org .apache .http .client .utils .URLEncodedUtils ;
2422import org .apache .http .entity .StringEntity ;
@@ -88,8 +86,6 @@ public void run(@NotNull ProgressIndicator indicator) {
8886 ApplicationManager .getApplication ().invokeLater (() -> {
8987 CloseableHttpClient httpClient = HttpClientBuilder .create ().build ();
9088
91-
92- boolean success = false ;
9389 try {
9490 ArrayList <NameValuePair > nameValuePairs = new ArrayList <>() {{
9591 add (new BasicNameValuePair ("plugin" , pluginId ));
@@ -100,20 +96,11 @@ public void run(@NotNull ProgressIndicator indicator) {
10096 request .addHeader ("x-plugin-version" , pluginVersion );
10197
10298 request .setEntity (new StringEntity (s ));
103- CloseableHttpResponse execute = httpClient .execute (request );
99+ httpClient .execute (request );
104100 httpClient .close ();
105-
106- int statusCode = execute .getStatusLine ().getStatusCode ();
107- success = statusCode >= 200 && statusCode < 300 ;
108101 } catch (Exception ignored ) {
109102 }
110103
111- if (!success ) {
112- Messages .showErrorDialog (parentComponent , "Failed submitting your report!" , "Error Report" );
113- return ;
114- }
115-
116- Messages .showInfoMessage (parentComponent , "Thank you for submitting your report!" , "Error Report" );
117104 consumer .consume (new SubmittedReportInfo (SubmittedReportInfo .SubmissionStatus .NEW_ISSUE ));
118105 });
119106 }
0 commit comments