[jira] [Commented] (ANY23-341) Remove dependency on defunct commons-httpclient 3.1

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424437#comment-16424437
 ] 

ASF GitHub Bot commented on ANY23-341:
--

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!


> Remove dependency on defunct commons-httpclient 3.1
> ---
>
> Key: ANY23-341
> URL: https://issues.apache.org/jira/browse/ANY23-341
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 2.2
>Reporter: Hans Brende
>Priority: Minor
> Fix For: 2.3
>
>
> commons-httpclient has been replaced by httpcomponents. It was last updated 
> back in 2007. We should remove this dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[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!


---


[jira] [Commented] (ANY23-341) Remove dependency on defunct commons-httpclient 3.1

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424433#comment-16424433
 ] 

ASF GitHub Bot commented on ANY23-341:
--

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?


> Remove dependency on defunct commons-httpclient 3.1
> ---
>
> Key: ANY23-341
> URL: https://issues.apache.org/jira/browse/ANY23-341
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 2.2
>Reporter: Hans Brende
>Priority: Minor
> Fix For: 2.3
>
>
> commons-httpclient has been replaced by httpcomponents. It was last updated 
> back in 2007. We should remove this dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[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?


---


[jira] [Commented] (ANY23-341) Remove dependency on defunct commons-httpclient 3.1

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424412#comment-16424412
 ] 

ASF GitHub Bot commented on ANY23-341:
--

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




> Remove dependency on defunct commons-httpclient 3.1
> ---
>
> Key: ANY23-341
> URL: https://issues.apache.org/jira/browse/ANY23-341
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 2.2
>Reporter: Hans Brende
>Priority: Minor
> Fix For: 2.3
>
>
> commons-httpclient has been replaced by httpcomponents. It was last updated 
> back in 2007. We should remove this dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[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




---


[jira] [Created] (ANY23-341) Remove dependency on defunct commons-httpclient 3.1

2018-04-03 Thread Hans Brende (JIRA)
Hans Brende created ANY23-341:
-

 Summary: Remove dependency on defunct commons-httpclient 3.1
 Key: ANY23-341
 URL: https://issues.apache.org/jira/browse/ANY23-341
 Project: Apache Any23
  Issue Type: Improvement
  Components: core
Affects Versions: 2.2
Reporter: Hans Brende
 Fix For: 2.3


commons-httpclient has been replaced by httpcomponents. It was last updated 
back in 2007. We should remove this dependency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ANY23-323) Update Eclipse RDF4J version to 2.3

2018-04-03 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423992#comment-16423992
 ] 

Hudson commented on ANY23-323:
--

SUCCESS: Integrated in Jenkins build Any23-trunk #1552 (See 
[https://builds.apache.org/job/Any23-trunk/1552/])
ANY23-323 Update Eclipse RDF4J version to 2.3.0 (hans: rev 
f9abbec20ccf0936cab181d1730f6bcdf8227692)
* (edit) core/src/main/java/org/apache/any23/extractor/rdf/BaseRDFExtractor.java
* (edit) pom.xml


> Update Eclipse RDF4J version to 2.3
> ---
>
> Key: ANY23-323
> URL: https://issues.apache.org/jira/browse/ANY23-323
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: api, core
>Affects Versions: 2.1
>Reporter: Jacek Grzebyta
>Priority: Minor
>  Labels: rdf4j
>
> Currently RDF4J release 2.3-SNAPSHOT contains a few valuable issues solved. 
> One of the useful is implemented *pretty printing* at least for turtle and 
> trig writers.
> I will create PR with the results but suggest merging it with master branch 
> after RDF4J release 2.3 will be published because it is still under strong 
> development.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (ANY23-323) Update Eclipse RDF4J version to 2.3

2018-04-03 Thread Hans Brende (JIRA)

 [ 
https://issues.apache.org/jira/browse/ANY23-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hans Brende resolved ANY23-323.
---
Resolution: Fixed

> Update Eclipse RDF4J version to 2.3
> ---
>
> Key: ANY23-323
> URL: https://issues.apache.org/jira/browse/ANY23-323
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: api, core
>Affects Versions: 2.1
>Reporter: Jacek Grzebyta
>Priority: Minor
>  Labels: rdf4j
>
> Currently RDF4J release 2.3-SNAPSHOT contains a few valuable issues solved. 
> One of the useful is implemented *pretty printing* at least for turtle and 
> trig writers.
> I will create PR with the results but suggest merging it with master branch 
> after RDF4J release 2.3 will be published because it is still under strong 
> development.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ANY23-323) Update Eclipse RDF4J version to 2.3

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423902#comment-16423902
 ] 

ASF GitHub Bot commented on ANY23-323:
--

Github user asfgit closed the pull request at:

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


> Update Eclipse RDF4J version to 2.3
> ---
>
> Key: ANY23-323
> URL: https://issues.apache.org/jira/browse/ANY23-323
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: api, core
>Affects Versions: 2.1
>Reporter: Jacek Grzebyta
>Priority: Minor
>  Labels: rdf4j
>
> Currently RDF4J release 2.3-SNAPSHOT contains a few valuable issues solved. 
> One of the useful is implemented *pretty printing* at least for turtle and 
> trig writers.
> I will create PR with the results but suggest merging it with master branch 
> after RDF4J release 2.3 will be published because it is still under strong 
> development.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] any23 pull request #70: ANY23-323 Update Eclipse RDF4J version to 2.3.0

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

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


---


[jira] [Commented] (ANY23-323) Update Eclipse RDF4J version to 2.3

2018-04-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ANY23-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423875#comment-16423875
 ] 

ASF GitHub Bot commented on ANY23-323:
--

GitHub user HansBrende opened a pull request:

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

ANY23-323 Update Eclipse RDF4J version to 2.3.0

I also had to add `BasicParserSettings.VERIFY_RELATIVE_URIS` as a non-fatal 
error, due to differences in the ways that version 2.2.4 and 2.3.0 calculated 
whether a URI is *opaque*:

2.2.4 called any URI with a null path opaque (which could never happen)

2.3.0 called a URI opaque if it had a non-null scheme and its path did not 
begin with "/"

Without classifying the above error as non-fatal, errors occurred in the 
turtle parser test. Since the document IRI did not end with "/", it was 
classified as "opaque" by version 2.3.0, hence attempting to resolve a relative 
IRI against it resulted in an error.

mvn clean test -> all tests pass

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

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

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

https://github.com/apache/any23/pull/70.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 #70


commit ca6b4cc6fc76b5e4a87a71ce0c9baee419785a5c
Author: Hans 
Date:   2018-04-03T11:16:45Z

ANY23-323 Update Eclipse RDF4J version to 2.3.0




> Update Eclipse RDF4J version to 2.3
> ---
>
> Key: ANY23-323
> URL: https://issues.apache.org/jira/browse/ANY23-323
> Project: Apache Any23
>  Issue Type: Improvement
>  Components: api, core
>Affects Versions: 2.1
>Reporter: Jacek Grzebyta
>Priority: Minor
>  Labels: rdf4j
>
> Currently RDF4J release 2.3-SNAPSHOT contains a few valuable issues solved. 
> One of the useful is implemented *pretty printing* at least for turtle and 
> trig writers.
> I will create PR with the results but suggest merging it with master branch 
> after RDF4J release 2.3 will be published because it is still under strong 
> development.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] any23 pull request #70: ANY23-323 Update Eclipse RDF4J version to 2.3.0

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

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

ANY23-323 Update Eclipse RDF4J version to 2.3.0

I also had to add `BasicParserSettings.VERIFY_RELATIVE_URIS` as a non-fatal 
error, due to differences in the ways that version 2.2.4 and 2.3.0 calculated 
whether a URI is *opaque*:

2.2.4 called any URI with a null path opaque (which could never happen)

2.3.0 called a URI opaque if it had a non-null scheme and its path did not 
begin with "/"

Without classifying the above error as non-fatal, errors occurred in the 
turtle parser test. Since the document IRI did not end with "/", it was 
classified as "opaque" by version 2.3.0, hence attempting to resolve a relative 
IRI against it resulted in an error.

mvn clean test -> all tests pass

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

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

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

https://github.com/apache/any23/pull/70.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 #70


commit ca6b4cc6fc76b5e4a87a71ce0c9baee419785a5c
Author: Hans 
Date:   2018-04-03T11:16:45Z

ANY23-323 Update Eclipse RDF4J version to 2.3.0




---