1 | FileInputStream fis=null;↵ | | 1 | JFile↵
|
2 | try {↵ | | 2 | Chooser chooser = FileDialoger.promptToSaveFile("summary.csv");//$NON-NLS-1$↵
|
3 | File file = JMeterUtils.findFile(sysProp);↵ | | 3 | ↵
|
4 | if (file.canRead()){↵ | | |
|
5 | log.info("Loading system properties from: "+file.getCanonicalPath());↵ | | |
|
6 | fis = new FileInputStream(f↵ | | 4 | if (chooser == null) {↵
|
| | | 5 | return;↵
|
| | | 6 | }↵
|
| | | 7 | FileWriter writer = null;↵
|
| | | 8 | try {↵
|
7 | ile);↵ | | 9 | writer = new FileWriter(chooser.getSelectedFile());↵
|
8 | System.getProperties().load(fis);↵ | | 10 | ↵
|
9 | }↵ | | 11 | CSVSaveService.saveCSVStats(model,writer);↵
|
| | | 12 | } catch (FileNotFoundException e) {↵
|
| | | 13 | log.warn(e.getMessage());↵
|
10 | } catch (IOException e) {↵ | | 14 | } catch (IOException e) {↵
|
11 | log.warn("Error loading system property file: " + sysProp, e);↵ | | 15 | log.warn(↵
|
12 | ↵ | | 16 | e.getMessage());↵
|
13 | } finally {↵ | | 17 | } finally {↵
|
14 | JOrphanUtils.closeQuietly(fis);↵ | | 18 | JOrphanUtils.closeQuietly(writer);↵
|
15 | } | | 19 | }
|