You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by th...@apache.org on 2016/06/02 03:16:03 UTC

[04/12] tika git commit: Test Case updated with newer exception and getter

Test Case updated with newer exception and getter


Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/0d69ca75
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/0d69ca75
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/0d69ca75

Branch: refs/heads/TIKA-1508
Commit: 0d69ca7540b4350e043c5b9ed34d14a46bd70cf7
Parents: 64db961
Author: Thamme Gowda <tg...@gmail.com>
Authored: Sat Mar 12 06:51:14 2016 -0800
Committer: Thamme Gowda <tg...@gmail.com>
Committed: Sat Mar 12 06:51:14 2016 -0800

----------------------------------------------------------------------
 .../org/apache/tika/parser/DummyConfigurableParser.java  | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/0d69ca75/tika-core/src/test/java/org/apache/tika/parser/DummyConfigurableParser.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/DummyConfigurableParser.java b/tika-core/src/test/java/org/apache/tika/parser/DummyConfigurableParser.java
index 4bbeac9..e9466ca 100644
--- a/tika-core/src/test/java/org/apache/tika/parser/DummyConfigurableParser.java
+++ b/tika-core/src/test/java/org/apache/tika/parser/DummyConfigurableParser.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tika.parser;
 
+import org.apache.tika.exception.TikaConfigException;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
@@ -47,24 +48,16 @@ public class DummyConfigurableParser extends AbstractParser {
         MIMES.add(MediaType.OCTET_STREAM);
     }
 
-    private Map<String, String> params;
     @Override
     public Set<MediaType> getSupportedTypes(ParseContext context) {
         return MIMES;
     }
 
     @Override
-    public void configure(ParseContext context) throws TikaException {
-        super.configure(context);
-        this.params = context.getParams();
-        // initialize here
-    }
-
-    @Override
     public void parse(InputStream stream, ContentHandler handler,
                       Metadata metadata, ParseContext context)
             throws IOException, SAXException, TikaException {
-        for (Map.Entry<String, String> entry : this.params.entrySet()) {
+        for (Map.Entry<String, String> entry : getParams().entrySet()) {
             metadata.add(entry.getKey(), entry.getValue());
         }
     }