Changeset 6540


Ignore:
Timestamp:
09/22/15 09:51:12 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-vocabularies/src/main/java/eu/clarin/cmdi/vlo/transformers/CSVTransformer.java

    r6538 r6540  
    9898                InputStream input;
    9999                try{
    100                         input = CSVTransformer.class.getResourceAsStream("/" + Constants.CSV_PATH + map + ".csv");
    101                         //input = new FileInputStream(Constants.CSV_PATH + map + ".csv");
    102                 }catch(NullPointerException e){
     100                        input = new FileInputStream(Constants.CSV_PATH + map + ".csv");
     101                }catch(FileNotFoundException e){
    103102                        _logger.error("Could not find the file " + Constants.CSV_PATH + map + ".csv", e);
    104103                        _logger.info("trying with /" + Constants.CSV_PATH + map + ".csv");
    105                         input = new FileInputStream("/" + Constants.CSV_PATH + map + ".csv");
     104                        try{
     105                                input = new FileInputStream("/" + Constants.CSV_PATH + map + ".csv");
     106                        }catch(FileNotFoundException ex){
     107                                _logger.error("Could not find the file /" + Constants.CSV_PATH + map + ".csv", e);
     108                                _logger.info("trying to fetch from classpath /" + Constants.CSV_PATH + map + ".csv");
     109                                input = CSVTransformer.class.getResourceAsStream("/" + Constants.CSV_PATH + map + ".csv");
     110                        }
     111                       
    106112                       
    107113                }
Note: See TracChangeset for help on using the changeset viewer.