Fix ANY23-312 - fix problem with making wrong IRI if docIRI ends with # character
Signed-off-by:Jacek Grzebyta <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/any23/repo Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/52c199b3 Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/52c199b3 Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/52c199b3 Branch: refs/heads/master Commit: 52c199b30b89596d3d452f13812d6e4a5e8898ab Parents: e2ff945 Author: Jacek Grzebyta <[email protected]> Authored: Fri Oct 27 20:03:18 2017 +0100 Committer: Jacek Grzebyta <[email protected]> Committed: Fri Oct 27 20:03:18 2017 +0100 ---------------------------------------------------------------------- core/src/main/java/org/apache/any23/rdf/RDFUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/any23/blob/52c199b3/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 1e6cbd4..2d6b697 100644 --- a/core/src/main/java/org/apache/any23/rdf/RDFUtils.java +++ b/core/src/main/java/org/apache/any23/rdf/RDFUtils.java @@ -609,7 +609,7 @@ public class RDFUtils { String newType = StringUtils.implementJavaNaming(type); String iriString; - if (docIRI.toString().endsWith("/")) { + if (docIRI.toString().endsWith("/") || docIRI.toString().endsWith("#")) { iriString = docIRI.toString() + newType; } else { iriString = docIRI.toString() + "#" + newType;
