You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2016/06/13 15:17:41 UTC

[6/7] tika git commit: Merge remote-tracking branch 'origin/TIKA-1508' into TIKA-1508

Merge remote-tracking branch 'origin/TIKA-1508' into TIKA-1508

# Conflicts:
#	tika-core/src/main/java/org/apache/tika/config/TikaConfig.java


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

Branch: refs/heads/TIKA-1508
Commit: 2140858840af8f1c015f3570dc4ac8d2bb4405cf
Parents: 338db90 e48d191
Author: tballison <ta...@mitre.org>
Authored: Mon Jun 13 11:16:34 2016 -0400
Committer: tballison <ta...@mitre.org>
Committed: Mon Jun 13 11:16:34 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/tika/config/TikaConfig.java |  6 +--
 .../tika/parser/ParameterizedParserTest.java    |  9 +++++
 .../TIKA-1986-parameterized-decorated.xml       | 39 ++++++++++++++++++++
 3 files changed, 51 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/21408588/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
----------------------------------------------------------------------
diff --cc tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
index 692b007,1163d84..84fd636
--- a/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
@@@ -563,13 -563,19 +563,13 @@@ public class TikaConfig 
                      // TODO Support arguments, needed for Translators etc
                      // See the thread "Configuring parsers and translators" for details 
                  }
-                 
-                 // Have any decoration performed, eg explicit mimetypes
-                 loaded = decorate(loaded, element);
+ 
                  //if the instance is configurable, then call configure()
 -                if (loaded instanceof Configurable){
 -                    Map<String, Param<?>> params = getParams(element);
 -                    //Assigning the params to bean fields/setters
 -                    AnnotationUtils.assignFieldParams(loaded, params);
 -                    //invoking the configure() hook
 -                    ParseContext context = new ParseContext();
 -                    context.getParams().putAll(params);
 -                    ((Configurable) loaded).configure(context); // initialize here
 -                }
 +                Map<String, Param<?>> params = getParams(element);
 +                //Assigning the params to bean fields/setters
 +                AnnotationUtils.assignFieldParams(loaded, params);
+                 // Have any decoration performed, eg explicit mimetypes
+                 loaded = decorate(loaded, element);
                  // All done with setup
                  return loaded;
              } catch (ClassNotFoundException e) {

http://git-wip-us.apache.org/repos/asf/tika/blob/21408588/tika-core/src/test/java/org/apache/tika/parser/ParameterizedParserTest.java
----------------------------------------------------------------------