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 |
|
|
|
|
| 85.7% |
Uncovered Elements: 2 (14) |
Complexity: 4 |
Complexity Density: 0.33 |
|
10 |
|
public class FreemarkerConfiguration extends Configuration { |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
11 |
1 |
public static Configuration getDefaultConfiguration() {... |
12 |
1 |
return new FreemarkerConfiguration(); |
13 |
|
} |
14 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 3 |
Complexity Density: 0.27 |
|
15 |
1 |
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 |
|
|
30 |
0 |
e.printStackTrace(); |
31 |
|
} |
32 |
|
} |
33 |
|
} |