1 package com.github.mikkoi.maven.plugins.enforcer.rule.propertyusage;
2
3 import java.io.FileInputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.util.Properties;
7
8 @SuppressWarnings({"all"})
9 public class App3 {
10
11 public String value1 = "";
12
13 public Integer value2 = 0x0;
14
15 public double value3 = Double.valueOf("${my-third-val}");
16
17 public App3() {
18 Properties properties = new Properties();
19 try (InputStream inputStream = new FileInputStream("app3.properties") ) {
20 properties.load(inputStream);
21 value1 = properties.getProperty("my-first.property.value");
22 value2 = Integer.valueOf(properties.getProperty("my-second.prop.val"));
23
24 } catch (IOException e) {
25 System.out.print(e.getMessage());
26 }
27
28 }
29 }