You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@any23.apache.org by an...@apache.org on 2017/07/13 05:51:25 UTC
[5/6] any23 git commit: Fix compile and test errors to merge in
Fix compile and test errors to merge in
Signed-off-by: Peter Ansell <p_...@yahoo.com>
Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/f03e7970
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/f03e7970
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/f03e7970
Branch: refs/heads/master
Commit: f03e7970bf68bb94aeaf391c780805b9fde15121
Parents: 9839e21
Author: Peter Ansell <p_...@yahoo.com>
Authored: Thu Jul 13 15:50:09 2017 +1000
Committer: Peter Ansell <p_...@yahoo.com>
Committed: Thu Jul 13 15:50:09 2017 +1000
----------------------------------------------------------------------
README.md | 2 +-
cli/pom.xml | 2 +-
core/pom.xml | 6 +++++-
.../apache/any23/extractor/yaml/YAMLTikaParserTest.java | 12 +++++++-----
4 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/any23/blob/f03e7970/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e895e4f..6a7f135 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Any23 documentation can be found on the [website](http://any23.apache.org)
* [api](https://github.com/apache/any23/tree/master/api): Any23 library external API.
* [core](https://github.com/apache/any23/tree/master/core): The library core codebase.
- * [utils](https://github.com/apache/any23/tree/master/utils): A CSV specific package
+ * [csvutils](https://github.com/apache/any23/tree/master/csvutils): A CSV specific package
* [encoding](https://github.com/apache/any23/tree/master/encoding): Encoding detection library.
* [mime](https://github.com/apache/any23/tree/master/mime): MIME Type detection library.
* [nquads](https://github.com/apache/any23/tree/master/nquads): NQuads parsing and serialization library.
http://git-wip-us.apache.org/repos/asf/any23/blob/f03e7970/cli/pom.xml
----------------------------------------------------------------------
diff --git a/cli/pom.xml b/cli/pom.xml
index 47b9c06..5acedfb 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -50,7 +50,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>apache-any23-utils</artifactId>
+ <artifactId>apache-any23-csvutils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/any23/blob/f03e7970/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index a04571a..6216935 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -38,7 +38,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>apache-any23-utils</artifactId>
+ <artifactId>apache-any23-csvutils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -78,6 +78,10 @@
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ </dependency>
<!-- BEGIN: Tika -->
<dependency>
http://git-wip-us.apache.org/repos/asf/any23/blob/f03e7970/core/src/test/java/org/apache/any23/extractor/yaml/YAMLTikaParserTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/any23/extractor/yaml/YAMLTikaParserTest.java b/core/src/test/java/org/apache/any23/extractor/yaml/YAMLTikaParserTest.java
index 680b9fa..ebfe513 100644
--- a/core/src/test/java/org/apache/any23/extractor/yaml/YAMLTikaParserTest.java
+++ b/core/src/test/java/org/apache/any23/extractor/yaml/YAMLTikaParserTest.java
@@ -15,7 +15,7 @@
*/
package org.apache.any23.extractor.yaml;
-import com.mchange.util.AssertException;
+import java.io.BufferedInputStream;
import java.io.InputStream;
import org.apache.any23.mime.MIMEType;
import org.apache.any23.mime.TikaMIMETypeDetector;
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
*/
public class YAMLTikaParserTest {
- private static final String file1 = "/org/apache/any23/extractor/yaml/simple-load.yml";
+ private final String file1 = "/org/apache/any23/extractor/yaml/simple-load.yml";
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -46,14 +46,16 @@ public class YAMLTikaParserTest {
* Yaml type is detected by file name only so detector returns octet type.
* @throws Exception
*/
- @Test(expected = AssertionError.class)
+ @Test
public void tikaStreamDetect()
throws Exception {
- InputStream is = YAMLTikaParserTest.class.getResourceAsStream(file1);
+ InputStream is = new BufferedInputStream(this.getClass().getResourceAsStream(file1));
+ Assert.assertNotNull("Could not find test file: " + file1, is);
MIMEType type = detector.guessMIMEType(null, is, null);
log.info("Type: {}", type.toString());
- Assert.assertEquals("text/x-yaml", type.toString());
+ // Not currently doing stream detection for YAML, so it returns the default, octet-stream
+ Assert.assertEquals("application/octet-stream", type.toString());
}
@Test