Commit 1d42ee732db8920a5ff206b1ae3002695e99d47a

Authored by 96409975520
1 parent 7d72f216
Exists in master

Remoção de linhas comentadas.

src/main/java/br/com/checker/emag/core/ContentEvaluation.java
... ... @@ -434,26 +434,7 @@ public class ContentEvaluation extends Evaluation {
434 434 HttpMethod metodoRequisicaoGET = null;
435 435 HttpClient clienteHTTPJakartaCommons;
436 436 URL UrlConvertida;
437   - // try {
438   -
439   - // Código copiado da classe WebAgent.java para garantir o acesso
440   - // aos links da página por meio do cliente da API Jakarta Commons
441   - // VErsão 3.1
442   - /*
443   - * clienteHTTPJakartaCommons = new HttpClient(); clienteHTTPJakartaCommons
444   - * .getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new
445   - * DefaultHttpMethodRetryHandler(3,false)); clienteHTTPJakartaCommons
446   - * .getParams().setParameter("http.protocol.allow-circular-redirects" , true);
447   - * clienteHTTPJakartaCommons.getParams().setParameter(
448   - * HttpConnectionParams.CONNECTION_TIMEOUT, new Integer(2000));
449   - *
450   - * metodoRequisicaoGET = new GetMethod(UrlConvertida.toExternalForm()
451   - * );//URLEncoder.encode(UrlConvertida.toExternalForm(), "UTF-8"));
452   - *
453   - * metodoRequisicaoGET.setRequestHeader("user-agent", "NewUseAgent/1.0");
454   - * metodoRequisicaoGET.setRequestHeader("http.agent", "Jakarta Commons-HttpClient/3.1");
455   - * metodoRequisicaoGET.setFollowRedirects(true);
456   - */
  437 +
457 438  
458 439 codResponse = verificarConexao(href, "http.agent", "Jakarta Commons-HttpClient/3.1");
459 440 if (codResponse != 200) {
... ... @@ -463,29 +444,13 @@ public class ContentEvaluation extends Evaluation {
463 444 }
464 445 }
465 446  
466   - /*
467   - * } catch (MalformedURLException e) { e.printStackTrace(); return "aviso";
468   - *
469   - * } catch (IOException e) { e.printStackTrace(); return "aviso";
470   - *
471   - * } catch (IllegalArgumentException e) { e.printStackTrace(); return "aviso";
472   - *
473   - * } finally {
474   - *
475   - * if (metodoRequisicaoGET != null){ metodoRequisicaoGET.releaseConnection(); }
476   - *
477   - * }
478   - */
479   -
480   - /*
481   - * if(huc.getResponseCode() != HttpURLConnection.HTTP_OK) System.out.println(link.toString());
482   - */
  447 +
483 448 for (int cod : codErro) {
484 449 if (codResponse == cod) {
485 450 return "erro";
486 451 }
487 452  
488   - // }
  453 +
489 454  
490 455 }
491 456 }
... ...