You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@any23.apache.org by jg...@apache.org on 2018/01/02 19:04:07 UTC
[3/4] any23 git commit: Solved ANY23-316
Solved ANY23-316
- remove commented line in test
- RDFUtils: fixed isRelative method
Signed-off-by:Jacek Grzebyta <gr...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/21e2bf79
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/21e2bf79
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/21e2bf79
Branch: refs/heads/master
Commit: 21e2bf798d8d74360303eec5a3d31950925bfc4c
Parents: 43b1cf9
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Mon Jan 1 14:16:53 2018 +0000
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Mon Jan 1 14:16:53 2018 +0000
----------------------------------------------------------------------
core/src/main/java/org/apache/any23/rdf/RDFUtils.java | 10 ++++------
.../apache/any23/extractor/yaml/YAMLExtractorTest.java | 1 -
2 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/any23/blob/21e2bf79/core/src/main/java/org/apache/any23/rdf/RDFUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/any23/rdf/RDFUtils.java b/core/src/main/java/org/apache/any23/rdf/RDFUtils.java
index b8f143b..55f9920 100644
--- a/core/src/main/java/org/apache/any23/rdf/RDFUtils.java
+++ b/core/src/main/java/org/apache/any23/rdf/RDFUtils.java
@@ -564,12 +564,10 @@ public class RDFUtils {
*/
public static boolean isAbsoluteIRI(String href) {
try {
- SimpleValueFactory.getInstance().createIRI(href.trim());
- new java.net.URI(href.trim());
- return true;
- } catch (IllegalArgumentException e) {
- return false;
- } catch (URISyntaxException e) {
+ valueFactory.createIRI(href.trim());
+ java.net.URI asURI = new java.net.URI(href.trim());
+ return asURI.isAbsolute();
+ } catch (IllegalArgumentException | URISyntaxException e) {
return false;
}
}
http://git-wip-us.apache.org/repos/asf/any23/blob/21e2bf79/core/src/test/java/org/apache/any23/extractor/yaml/YAMLExtractorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/any23/extractor/yaml/YAMLExtractorTest.java b/core/src/test/java/org/apache/any23/extractor/yaml/YAMLExtractorTest.java
index 9aa8dee..e510c70 100644
--- a/core/src/test/java/org/apache/any23/extractor/yaml/YAMLExtractorTest.java
+++ b/core/src/test/java/org/apache/any23/extractor/yaml/YAMLExtractorTest.java
@@ -121,7 +121,6 @@ public class YAMLExtractorTest extends AbstractExtractorTestCase {
RDFUtils.triple(RDFUtils.bnode(), RDFUtils.iri(ns, "value3"), RDFUtils.bnode("10")),
RDFUtils.triple(RDFUtils.bnode("10"), RDF.FIRST, RDFUtils.bnode("11")),
RDFUtils.triple(RDFUtils.bnode("11"), RDFUtils.iri(ns, "key3.1"), RDFUtils.bnode("12")),
- // RDFUtils.triple(RDFUtils.bnode("12"), RDF.TYPE, RDF.LIST),
RDFUtils.triple(RDFUtils.bnode("12"), RDF.FIRST, RDFUtils.literal("value3.1.1"))
});