fixup
authorHans <firedrake93@gmail.com>
Sat, 4 Aug 2018 16:10:25 +0000 (11:10 -0500)
committerHans <firedrake93@gmail.com>
Sat, 4 Aug 2018 16:10:25 +0000 (11:10 -0500)
core/src/main/java/org/apache/any23/extractor/rdf/BaseRDFExtractor.java
core/src/test/java/org/apache/any23/extractor/html/EmbeddedJSONLDExtractorTest.java

index 797d878..ea582cb 100644 (file)
@@ -153,7 +153,7 @@ public abstract class BaseRDFExtractor implements Extractor.ContentExtractor {
                                 // in any case combination, are reserved. This means that:
                                 //   * users SHOULD NOT use them except as defined by later specifications
                                 //   * processors MUST NOT treat them as fatal errors."
-                                int prefixlen = oldKey.lastIndexOf(':') + 1;
+                                int prefixlen = newKey.lastIndexOf(':') + 1;
                                 String prefix = newKey.substring(0, prefixlen).toLowerCase();
                                 newKey = (prefix.startsWith("xml") ? prefix : "") + newKey.substring(prefixlen);
 
index 5daedd4..bbc98c9 100644 (file)
@@ -93,6 +93,7 @@ public class EmbeddedJSONLDExtractorTest extends AbstractExtractorTestCase {
        @Test
        public void testJSONLDBadCharacter() throws Exception {
                assertExtract("/html/html-jsonld-bad-character.html");
+               assertStatementsSize(null, null, null, 12);
        }
 
        @Override