I'll leave the moving to a new module to you?

-----Original Message-----
From: Chris Mattmann [mailto:mattm...@apache.org] 
Sent: Friday, July 7, 2017 10:32 AM
To: dev@tika.apache.org; comm...@tika.apache.org
Subject: Re: [tika] branch master updated: TIKA-1988 -- allow for errors 
downloading models

Great Tim thanks!




On 7/7/17, 7:28 AM, "talli...@apache.org" <talli...@apache.org> wrote:

    This is an automated email from the ASF dual-hosted git repository.
    
    tallison pushed a commit to branch master
    in repository https://gitbox.apache.org/repos/asf/tika.git
    
    
    The following commit(s) were added to refs/heads/master by this push:
         new 632f52d  TIKA-1988 -- allow for errors downloading models
    632f52d is described below
    
    commit 632f52db4713977aa93504517e57b8afe86e6e91
    Author: tballison <talli...@mitre.org>
    AuthorDate: Fri Jul 7 10:28:48 2017 -0400
    
        TIKA-1988 -- allow for errors downloading models
    ---
     .../tika/parser/recognition/AgeRecogniserConfig.java   | 18 
++++++++++++++++--
     1 file changed, 16 insertions(+), 2 deletions(-)
    
    diff --git 
a/tika-parsers/src/main/java/org/apache/tika/parser/recognition/AgeRecogniserConfig.java
 
b/tika-parsers/src/main/java/org/apache/tika/parser/recognition/AgeRecogniserConfig.java
    index 84c1f3e..92427f4 100644
    --- 
a/tika-parsers/src/main/java/org/apache/tika/parser/recognition/AgeRecogniserConfig.java
    +++ 
b/tika-parsers/src/main/java/org/apache/tika/parser/recognition/AgeRecogniserConfig.java
    @@ -17,7 +17,9 @@
     
     package org.apache.tika.parser.recognition;
     
    +import java.net.URL;
     import java.util.Map;
    +
     import org.apache.tika.config.Param;
     
     
    @@ -30,8 +32,20 @@ public class AgeRecogniserConfig {
        private String pathClassifyRegression = null;
     
        public AgeRecogniserConfig(Map<String, Param> params) {
    -       
setPathClassifyModel(AgeRecogniserConfig.class.getResource(params.get("age.path.classify").getValue().toString()).getFile());
    -       
setPathClassifyRegression(AgeRecogniserConfig.class.getResource(params.get("age.path.regression").getValue().toString()).getFile());
    +
    +           URL classifyUrl = AgeRecogniserConfig.class.getResource(
    +                           
params.get("age.path.classify").getValue().toString());
    +
    +           if (classifyUrl != null) {
    +                   setPathClassifyModel(classifyUrl.getFile());
    +           }
    +
    +           URL regressionUrl = AgeRecogniserConfig.class.getResource(
    +                           
params.get("age.path.regression").getValue().toString());
    +
    +           if (regressionUrl != null) {
    +                   setPathClassifyRegression(regressionUrl.getFile());
    +           }
        }
     
        public String getPathClassifyModel() {
    
    -- 
    To stop receiving notification emails like this one, please contact
    ['"comm...@tika.apache.org" <comm...@tika.apache.org>'].
    


Reply via email to