[GitHub] any23 pull request #71: ANY23-341 Remove dependency on defunct commons-httpc...

2018-04-04 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/any23/pull/71


---


[GitHub] any23 pull request #71: ANY23-341 Remove dependency on defunct commons-httpc...

2018-04-03 Thread HansBrende
Github user HansBrende commented on a diff in the pull request:

https://github.com/apache/any23/pull/71#discussion_r178926732
  
--- Diff: 
core/src/main/java/org/apache/any23/extractor/html/HTMLDocument.java ---
@@ -375,15 +376,16 @@ public String getDefaultLanguage() {
 
 private java.net.URI getBaseIRI() throws ExtractionException {
 if (baseIRI == null) {
+String uri = (document instanceof Document ? 
(Document)document : document.getOwnerDocument()).getDocumentURI();
 try {
-if (document.getBaseURI() == null) {
-log.warn("document.getBaseURI() is null, this should 
not happen");
+if (uri == null) {
+log.warn("document.getBaseURI() is null, this should 
not happen", new Exception());
--- End diff --

@lewismc Oops, yeah, I added that exception in there just to get the 
stacktrace for debugging purposes, but forgot to take it out again!


---


[GitHub] any23 pull request #71: ANY23-341 Remove dependency on defunct commons-httpc...

2018-04-03 Thread lewismc
Github user lewismc commented on a diff in the pull request:

https://github.com/apache/any23/pull/71#discussion_r178925133
  
--- Diff: 
core/src/main/java/org/apache/any23/extractor/html/HTMLDocument.java ---
@@ -375,15 +376,16 @@ public String getDefaultLanguage() {
 
 private java.net.URI getBaseIRI() throws ExtractionException {
 if (baseIRI == null) {
+String uri = (document instanceof Document ? 
(Document)document : document.getOwnerDocument()).getDocumentURI();
 try {
-if (document.getBaseURI() == null) {
-log.warn("document.getBaseURI() is null, this should 
not happen");
+if (uri == null) {
+log.warn("document.getBaseURI() is null, this should 
not happen", new Exception());
--- End diff --

Can the Exception be more specific?


---


[GitHub] any23 pull request #71: ANY23-341 Remove dependency on defunct commons-httpc...

2018-04-03 Thread HansBrende
GitHub user HansBrende opened a pull request:

https://github.com/apache/any23/pull/71

ANY23-341 Remove dependency on defunct commons-httpclient

This is my first stab at removing the decade-out-of-date 
`commons-httpclient` dependency.

All tests are passing, but I want another set of eyes on this.

@lewismc any comments?

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/HansBrende/any23 ANY23-341

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/any23/pull/71.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #71


commit 355e288406d2f8fc673f4a399edba737791d17aa
Author: Hans 
Date:   2018-04-03T18:33:20Z

ANY23-341 Remove dependency on defunct commons-httpclient




---