- Timestamp:
- 11/28/12 14:44:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/article/recs/plugins/energy/RecsNodeBaseEEP.java
r656 r660 23 23 public abstract class RecsNodeBaseEEP extends BaseEnergyEstimationPlugin{ 24 24 25 private static String powerDataFileName = "src/test/article/recs/data/power_data.properties"; 25 private static String POWER_DATA_FILE_NAME = "src/test/article/recs/data/power_data.properties"; 26 27 private ResourceBundle powBundle; 28 26 29 private TaskToApp taskToApp = new TaskToApp(); 27 30 … … 72 75 73 76 protected double getMeasuredPower(String query) throws FileNotFoundException, IOException{ 74 ResourceBundle bundle = new PropertyResourceBundle(new FileInputStream(powerDataFileName)); 75 76 return Double.valueOf(bundle.getString(query)).doubleValue(); 77 ResourceBundle powBundle = getPowBundle(); 78 return Double.valueOf(powBundle.getString(query)).doubleValue(); 79 } 80 81 private ResourceBundle getPowBundle() throws FileNotFoundException, IOException{ 82 if(powBundle == null){ 83 powBundle = new PropertyResourceBundle(new FileInputStream(POWER_DATA_FILE_NAME)); 84 } 85 return powBundle; 77 86 } 78 87 }
Note: See TracChangeset
for help on using the changeset viewer.