1. Project Clover database Mon Aug 27 2018 22:12:52 BRT
  2. Package net.technearts.rip

File FreemarkerConfiguration.java

 

Coverage histogram

../../../img/srcFileCovDistChart9.png
14% of files have more coverage

Code metrics

0
12
2
1
33
28
4
0.33
6
2
2

Classes

Class Line # Actions
FreemarkerConfiguration 10 12 0% 4 2
0.8571428785.7%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package net.technearts.rip;
2   
3    import java.io.File;
4    import java.io.IOException;
5    import java.net.URISyntaxException;
6   
7    import freemarker.template.Configuration;
8    import freemarker.template.TemplateExceptionHandler;
9   
 
10    public class FreemarkerConfiguration extends Configuration {
 
11  1 toggle public static Configuration getDefaultConfiguration() {
12  1 return new FreemarkerConfiguration();
13    }
14   
 
15  1 toggle private FreemarkerConfiguration() {
16  1 super(VERSION_2_3_26);
17  1 setDefaultEncoding("UTF-8");
18  1 setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
19  1 setLogTemplateExceptions(false);
20  1 try {
21  1 File f;
22  1 try {
23  1 f = new File(RipResponseBuilder.class.getResource("/").toURI());
24    } catch (final URISyntaxException e) {
25  0 f = new File(RipResponseBuilder.class.getResource("/").getPath());
26    }
27  1 setDirectoryForTemplateLoading(f);
28    } catch (final IOException e) {
29    // TODO Auto-generated catch block
30  0 e.printStackTrace();
31    }
32    }
33    }