bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public HTMLLicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); try { textArea = new JEditorPane(); textArea.setEditable(false); textArea.addHyperlinkListener(this); JScrollPane scroller = new JScrollPane(textArea); textArea.setPage(loadLicence()); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); } catch (Exception err) { err.printStackTrace(); } agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; gbConstraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
public HTMLLicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); try { textArea = new JEditorPane(); textArea.setEditable(false); textArea.addHyperlinkListener(this); JScrollPane scroller = new JScrollPane(textArea); textArea.setPage(loadLicence()); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); } catch (Exception err) { err.printStackTrace(); } agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; gbConstraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
3,241,545
public HTMLLicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); try { textArea = new JEditorPane(); textArea.setEditable(false); textArea.addHyperlinkListener(this); JScrollPane scroller = new JScrollPane(textArea); textArea.setPage(loadLicence()); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); } catch (Exception err) { err.printStackTrace(); } agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; gbConstraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
public HTMLLicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); try { textArea = new JEditorPane(); textArea.setEditable(false); textArea.addHyperlinkListener(this); JScrollPane scroller = new JScrollPane(textArea); textArea.setPage(loadLicence()); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); } catch (Exception err) { err.printStackTrace(); } agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; gbConstraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.EAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
3,241,546
public void hyperlinkUpdate(HyperlinkEvent e) { try { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) textArea.setPage(e.getURL()); } catch (Exception err) {} }
public void hyperlinkUpdate(HyperlinkEvent e) { try { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) textArea.setPage(e.getURL()); } catch (Exception err) {} }
3,241,547
public boolean isValidated() { if (noRadio.isSelected()) { parent.exit(); return false; } else return (yesRadio.isSelected()); }
public boolean isValidated() { if (noRadio.isSelected()) { parent.exit(); return false; } else return (yesRadio.isSelected()); }
3,241,548
private URL loadLicence() { String resNamePrifix = "HTMLLicencePanel.licence"; try { return ResourceManager.getInstance().getURL(resNamePrifix); } catch (Exception ex) { ex.printStackTrace(); } return null; }
private URL loadLicence() { String resNamePrifix = "HTMLLicencePanel.licence"; try { return ResourceManager.getInstance().getURL(resNamePrifix); } catch (Exception ex) { ex.printStackTrace(); } return null; }
3,241,549
public static void loadDefaultInstallDir(InstallerFrame parentFrame, InstallData idata) { // Load only once ... if (getDefaultInstallDir() != null) return; BufferedReader br = null; try { InputStream in = null; if (OsVersion.IS_WINDOWS) in = parentFrame.getResource("TargetPanel.dir.windows"); else if (OsVersion.IS_OSX) in = parentFrame.getResource("TargetPanel.dir.macosx"); else { String os = System.getProperty("os.name"); // first try to look up by specific os name os = os.replace(' ', '_'); // avoid spaces in file names os = os.toLowerCase(); // for consistency among TargetPanel res // files try { in = parentFrame.getResource("TargetPanel.dir.".concat(os)); } catch (ResourceNotFoundException rnfe) {} // if not specific os, try getting generic 'unix' resource file if (in == null) in = parentFrame.getResource("TargetPanel.dir.unix"); // if all those failed, try to look up a generic dir file if (in == null) { try { in = parentFrame.getResource("TargetPanel.dir.unix"); } catch (ResourceNotFoundException eee) {} } } // if all above tests failed, there is no resource file, // so use system default if (in == null) { try { in = parentFrame.getResource("TargetPanel.dir"); } catch (ResourceNotFoundException eee) {} } // now read the file, once we've identified which one to read InputStreamReader isr = new InputStreamReader(in); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { line = line.trim(); // use the first non-blank line if (!"".equals(line)) break; } defaultInstallDir = line; VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); defaultInstallDir = vs.substitute(defaultInstallDir, null); } catch (Exception e) { defaultInstallDir = null; // leave unset to take the system default set by Installer class } finally { try { if (br != null) br.close(); } catch (IOException ignored) {} } }
} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } public} catch (ResourceNotFoundException rnfe) {} } static} catch (ResourceNotFoundException rnfe) {} } void} catch (ResourceNotFoundException rnfe) {} } loadDefaultInstallDir(InstallerFrame} catch (ResourceNotFoundException rnfe) {} } parentFrame,} catch (ResourceNotFoundException rnfe) {} } InstallData} catch (ResourceNotFoundException rnfe) {} } idata)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } Load} catch (ResourceNotFoundException rnfe) {} } only} catch (ResourceNotFoundException rnfe) {} } once} catch (ResourceNotFoundException rnfe) {} } ...} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (getDefaultInstallDir()} catch (ResourceNotFoundException rnfe) {} } !=} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } return;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } BufferedReader} catch (ResourceNotFoundException rnfe) {} } br} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } null;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } InputStream} catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } null;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (OsVersion.IS_WINDOWS)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir.windows");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } else} catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (OsVersion.IS_OSX)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir.macosx");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } else} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } String} catch (ResourceNotFoundException rnfe) {} } os} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } System.getProperty("os.name");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } first} catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } to} catch (ResourceNotFoundException rnfe) {} } look} catch (ResourceNotFoundException rnfe) {} } up} catch (ResourceNotFoundException rnfe) {} } by} catch (ResourceNotFoundException rnfe) {} } specific} catch (ResourceNotFoundException rnfe) {} } os} catch (ResourceNotFoundException rnfe) {} } name} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } os} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } os.replace('} catch (ResourceNotFoundException rnfe) {} } ',} catch (ResourceNotFoundException rnfe) {} } '_');} catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } avoid} catch (ResourceNotFoundException rnfe) {} } spaces} catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } file} catch (ResourceNotFoundException rnfe) {} } names} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } os} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } os.toLowerCase();} catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } for} catch (ResourceNotFoundException rnfe) {} } consistency} catch (ResourceNotFoundException rnfe) {} } among} catch (ResourceNotFoundException rnfe) {} } TargetPanel} catch (ResourceNotFoundException rnfe) {} } res} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } files} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir.".concat(os));} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } catch} catch (ResourceNotFoundException rnfe) {} } (ResourceNotFoundException} catch (ResourceNotFoundException rnfe) {} } rnfe)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {}} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } not} catch (ResourceNotFoundException rnfe) {} } specific} catch (ResourceNotFoundException rnfe) {} } os,} catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } getting} catch (ResourceNotFoundException rnfe) {} } generic} catch (ResourceNotFoundException rnfe) {} } 'unix'} catch (ResourceNotFoundException rnfe) {} } resource} catch (ResourceNotFoundException rnfe) {} } file} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (in} catch (ResourceNotFoundException rnfe) {} } ==} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir.unix");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } all} catch (ResourceNotFoundException rnfe) {} } those} catch (ResourceNotFoundException rnfe) {} } failed,} catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } to} catch (ResourceNotFoundException rnfe) {} } look} catch (ResourceNotFoundException rnfe) {} } up} catch (ResourceNotFoundException rnfe) {} } a} catch (ResourceNotFoundException rnfe) {} } generic} catch (ResourceNotFoundException rnfe) {} } dir} catch (ResourceNotFoundException rnfe) {} } file} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (in} catch (ResourceNotFoundException rnfe) {} } ==} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir.unix");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } catch} catch (ResourceNotFoundException rnfe) {} } (ResourceNotFoundException} catch (ResourceNotFoundException rnfe) {} } eee)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {}} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } all} catch (ResourceNotFoundException rnfe) {} } above} catch (ResourceNotFoundException rnfe) {} } tests} catch (ResourceNotFoundException rnfe) {} } failed,} catch (ResourceNotFoundException rnfe) {} } there} catch (ResourceNotFoundException rnfe) {} } is} catch (ResourceNotFoundException rnfe) {} } no} catch (ResourceNotFoundException rnfe) {} } resource} catch (ResourceNotFoundException rnfe) {} } file,} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } so} catch (ResourceNotFoundException rnfe) {} } use} catch (ResourceNotFoundException rnfe) {} } system} catch (ResourceNotFoundException rnfe) {} } default} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (in} catch (ResourceNotFoundException rnfe) {} } ==} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } in} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } parentFrame.getResource("TargetPanel.dir");} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } catch} catch (ResourceNotFoundException rnfe) {} } (ResourceNotFoundException} catch (ResourceNotFoundException rnfe) {} } eee)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {}} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } now} catch (ResourceNotFoundException rnfe) {} } read} catch (ResourceNotFoundException rnfe) {} } the} catch (ResourceNotFoundException rnfe) {} } file,} catch (ResourceNotFoundException rnfe) {} } once} catch (ResourceNotFoundException rnfe) {} } we've} catch (ResourceNotFoundException rnfe) {} } identified} catch (ResourceNotFoundException rnfe) {} } which} catch (ResourceNotFoundException rnfe) {} } one} catch (ResourceNotFoundException rnfe) {} } to} catch (ResourceNotFoundException rnfe) {} } read} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } InputStreamReader} catch (ResourceNotFoundException rnfe) {} } isr} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } new} catch (ResourceNotFoundException rnfe) {} } InputStreamReader(in);} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } br} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } new} catch (ResourceNotFoundException rnfe) {} } BufferedReader(isr);} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } String} catch (ResourceNotFoundException rnfe) {} } line;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } while} catch (ResourceNotFoundException rnfe) {} } ((line} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } br.readLine())} catch (ResourceNotFoundException rnfe) {} } !=} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } line} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } line.trim();} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } use} catch (ResourceNotFoundException rnfe) {} } the} catch (ResourceNotFoundException rnfe) {} } first} catch (ResourceNotFoundException rnfe) {} } non-blank} catch (ResourceNotFoundException rnfe) {} } line} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (!"".equals(line))} catch (ResourceNotFoundException rnfe) {} } break;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } defaultInstallDir} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } line;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } VariableSubstitutor} catch (ResourceNotFoundException rnfe) {} } vs} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } new} catch (ResourceNotFoundException rnfe) {} } VariableSubstitutor(idata.getVariables());} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } defaultInstallDir} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } vs.substitute(defaultInstallDir,} catch (ResourceNotFoundException rnfe) {} } null);} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } catch} catch (ResourceNotFoundException rnfe) {} } (Exception} catch (ResourceNotFoundException rnfe) {} } e)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } defaultInstallDir} catch (ResourceNotFoundException rnfe) {} } =} catch (ResourceNotFoundException rnfe) {} } null;} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } //} catch (ResourceNotFoundException rnfe) {} } leave} catch (ResourceNotFoundException rnfe) {} } unset} catch (ResourceNotFoundException rnfe) {} } to} catch (ResourceNotFoundException rnfe) {} } take} catch (ResourceNotFoundException rnfe) {} } the} catch (ResourceNotFoundException rnfe) {} } system} catch (ResourceNotFoundException rnfe) {} } default} catch (ResourceNotFoundException rnfe) {} } set} catch (ResourceNotFoundException rnfe) {} } by} catch (ResourceNotFoundException rnfe) {} } Installer} catch (ResourceNotFoundException rnfe) {} } class} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } finally} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } try} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } if} catch (ResourceNotFoundException rnfe) {} } (br} catch (ResourceNotFoundException rnfe) {} } !=} catch (ResourceNotFoundException rnfe) {} } null)} catch (ResourceNotFoundException rnfe) {} } br.close();} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } catch} catch (ResourceNotFoundException rnfe) {} } (IOException} catch (ResourceNotFoundException rnfe) {} } ignored)} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } {}} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }} catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } } catch (ResourceNotFoundException rnfe) {} } }
3,241,550
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { _factory.destroyObject(pair.value); if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { _numActive++; return pair.value; } } }
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { _factory.destroyObject(pair.value); if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { _numActive++; return pair.value; } } }
3,241,552
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { _factory.destroyObject(pair.value); if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { _numActive++; return pair.value; } } }
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { _factory.destroyObject(pair.value); if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { _numActive++; return pair.value; } } }
3,241,553
private void performValueSetting(XMLElement regEntry, VariableSubstitutor substitutor) throws Exception { SpecHelper specHelper = getSpecHelper(); String name = specHelper.getRequiredAttribute(regEntry, REG_BASENAME); name = substitutor.substitute(name, null); String keypath = specHelper.getRequiredAttribute(regEntry, REG_KEYPATH); keypath = substitutor.substitute(keypath, null); String root = specHelper.getRequiredAttribute(regEntry, REG_ROOT); int rootId = resolveRoot(regEntry, root, substitutor); RegistryHandler rh = RegistryDefaultHandler.getInstance(); if (rh == null) return; rh.setRoot(rootId); String override = regEntry.getAttribute(REG_OVERRIDE, "true"); if (!override.equalsIgnoreCase("true")) { // Do not set value if override is not true and the value exist. if (rh.getValue(keypath, name, null) != null) return; } String value = regEntry.getAttribute(REG_DWORD); if (value != null) { // Value type is DWord; placeholder possible. value = substitutor.substitute(value, null); rh.setValue(keypath, name, Long.parseLong(value)); return; } value = regEntry.getAttribute(REG_STRING); if (value != null) { // Value type is string; placeholder possible. value = substitutor.substitute(value, null); rh.setValue(keypath, name, value); return; } Vector values = regEntry.getChildrenNamed(REG_MULTI); if (values != null && !values.isEmpty()) { // Value type is REG_MULTI_SZ; placeholder possible. Iterator multiIter = values.iterator(); String[] multiString = new String[values.size()]; for (int i = 0; multiIter.hasNext(); ++i) { XMLElement element = (XMLElement) multiIter.next(); multiString[i] = specHelper.getRequiredAttribute(element, REG_DATA); multiString[i] = substitutor.substitute(multiString[i], null); } rh.setValue(keypath, name, multiString); return; } values = regEntry.getChildrenNamed(REG_BIN); if (values != null && !values.isEmpty()) { // Value type is REG_BINARY; placeholder possible or not ??? why not // ... Iterator multiIter = values.iterator(); StringBuffer buf = new StringBuffer(); for (int i = 0; multiIter.hasNext(); ++i) { XMLElement element = (XMLElement) multiIter.next(); String tmp = specHelper.getRequiredAttribute(element, REG_DATA); buf.append(tmp); if (!tmp.endsWith(",") && multiIter.hasNext()) buf.append(","); } byte[] bytes = extractBytes(regEntry, substitutor.substitute(buf.toString(), null)); rh.setValue(keypath, name, bytes); return; } specHelper.parseError(regEntry, "No data found."); }
private void performValueSetting(XMLElement regEntry, VariableSubstitutor substitutor) throws Exception { SpecHelper specHelper = getSpecHelper(); String name = specHelper.getRequiredAttribute(regEntry, REG_BASENAME); name = substitutor.substitute(name, null); String keypath = specHelper.getRequiredAttribute(regEntry, REG_KEYPATH); keypath = substitutor.substitute(keypath, null); String root = specHelper.getRequiredAttribute(regEntry, REG_ROOT); int rootId = resolveRoot(regEntry, root, substitutor); RegistryHandler rh = RegistryDefaultHandler.getInstance(); if (rh == null) return; rh.setRoot(rootId); String override = regEntry.getAttribute(REG_OVERRIDE, "true"); if (!"true".equalsIgnoreCase(override)) { // Do not set value if override is not true and the value exist. if (rh.getValue(keypath, name, null) != null) return; } String value = regEntry.getAttribute(REG_DWORD); if (value != null) { // Value type is DWord; placeholder possible. value = substitutor.substitute(value, null); rh.setValue(keypath, name, Long.parseLong(value)); return; } value = regEntry.getAttribute(REG_STRING); if (value != null) { // Value type is string; placeholder possible. value = substitutor.substitute(value, null); rh.setValue(keypath, name, value); return; } Vector values = regEntry.getChildrenNamed(REG_MULTI); if (values != null && !values.isEmpty()) { // Value type is REG_MULTI_SZ; placeholder possible. Iterator multiIter = values.iterator(); String[] multiString = new String[values.size()]; for (int i = 0; multiIter.hasNext(); ++i) { XMLElement element = (XMLElement) multiIter.next(); multiString[i] = specHelper.getRequiredAttribute(element, REG_DATA); multiString[i] = substitutor.substitute(multiString[i], null); } rh.setValue(keypath, name, multiString); return; } values = regEntry.getChildrenNamed(REG_BIN); if (values != null && !values.isEmpty()) { // Value type is REG_BINARY; placeholder possible or not ??? why not // ... Iterator multiIter = values.iterator(); StringBuffer buf = new StringBuffer(); for (int i = 0; multiIter.hasNext(); ++i) { XMLElement element = (XMLElement) multiIter.next(); String tmp = specHelper.getRequiredAttribute(element, REG_DATA); buf.append(tmp); if (!tmp.endsWith(",") && multiIter.hasNext()) buf.append(","); } byte[] bytes = extractBytes(regEntry, substitutor.substitute(buf.toString(), null)); rh.setValue(keypath, name, bytes); return; } specHelper.parseError(regEntry, "No data found."); }
3,241,565
private int resolveRoot(XMLElement regEntry, String root, VariableSubstitutor substitutor) throws Exception { root = substitutor.substitute(root, null); Integer tmp = (Integer) RegistryHandler.ROOT_KEY_MAP.get(root); if (tmp != null) return (tmp.intValue()); getSpecHelper().parseError(regEntry, "Unknown value (" + root + ")for registry root."); return 0; }
private int resolveRoot(XMLElement regEntry, String root, VariableSubstitutor substitutor) throws Exception { root = substitutor.substitute(root, null); Integer tmp = (Integer) RegistryHandler.ROOT_KEY_MAP.get(root); if (tmp != null) return (tmp.intValue()); getSpecHelper().parseError(regEntry, "Unknown value (" + root + ")for registry root."); return 0; }
3,241,566
private int resolveRoot(XMLElement regEntry, String root, VariableSubstitutor substitutor) throws Exception { root = substitutor.substitute(root, null); Integer tmp = (Integer) RegistryHandler.ROOT_KEY_MAP.get(root); if (tmp != null) return (tmp.intValue()); getSpecHelper().parseError(regEntry, "Unknown value (" + root + ")for registry root."); return 0; }
private int resolveRoot(XMLElement regEntry, String root, VariableSubstitutor substitutor) throws Exception { root = substitutor.substitute(root, null); Integer tmp = (Integer) RegistryHandler.ROOT_KEY_MAP.get(root); if (tmp != null) return (tmp.intValue()); getSpecHelper().parseError(regEntry, "Unknown value (" + root1 + ")for registry root."); return 0; }
3,241,567
public void run() { while(!_cancelled) { try { Thread.sleep(_delay); } catch(Exception e) { // ignored } try { evict(); } catch(Exception e) { // ignored } try { ensureMinIdle(); } catch(Exception e) { // ignored } } }
public void run() { while(!_cancelled) { try { Thread.sleep(_delay); } catch(Exception e) { // ignored } try { evict(); } catch(Exception e) { // ignored } try { ensureMinIdle(); } catch(Exception e) { // ignored } } }
3,241,568
public static void main(String[] args) { try { Class clazz = Uninstaller.class; Method target = clazz.getMethod("uninstall", new Class[] {String[].class}); new SelfModifier(target).invoke(args); } catch (Exception ioeOrTypo) { System.err.println(ioeOrTypo.getMessage()); ioeOrTypo.printStackTrace(); System.err.println("Unable to exec java as a subprocess."); System.err.println("The uninstall may not fully complete."); uninstall(args); } }
public static void main(String[] args) { try { Class clazz = Uninstaller.class; Method target = clazz.getMethod("uninstall", new Class[] {String[].class}); new SelfModifier(target).invoke(args); } catch (Exception ioeOrTypo) { System.err.println(ioeOrTypo.getMessage()); ioeOrTypo.printStackTrace(); System.err.println("Unable to exec java as a subprocess."); System.err.println("The uninstall may not fully complete."); uninstall(args); } }
3,241,569
public static void main(String[] args) { try { Class clazz = Uninstaller.class; Method target = clazz.getMethod("uninstall", new Class[] {String[].class}); new SelfModifier(target).invoke(args); } catch (Exception ioeOrTypo) { System.err.println(ioeOrTypo.getMessage()); ioeOrTypo.printStackTrace(); System.err.println("Unable to exec java as a subprocess."); System.err.println("The uninstall may not fully complete."); uninstall(args); } }
public static void main(String[] args) { try { Class clazz = Uninstaller.class; Method target = clazz.getMethod("uninstall", new Class[] {String[].class}); new SelfModifier(target).invoke(args); } catch (Exception ioeOrTypo) { System.err.println(ioeOrTypo.getMessage()); ioeOrTypo.printStackTrace(); System.err.println("Unable to exec java as a subprocess."); System.err.println("The uninstall may not fully complete."); uninstall(args); } }
3,241,570
public static void uninstall(String[] args) { try { MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); new UninstallerFrame(); } catch (Exception err) { System.err.println("- Error -"); err.printStackTrace(); System.exit(0); } }
public static void uninstall(String[] args) { try { MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); new UninstallerFrame(); } catch (Exception err) { System.err.println("- Error -"); err.printStackTrace(); System.exit(0); } }
3,241,571
public SelfModifier(Method method) throws IOException { phase = 1; initJavaExec(); initMethod(method); }
private SelfModifier() throws IOException { phase = 1; initJavaExec(); initMethod(method); }
3,241,572
public SelfModifier(Method method) throws IOException { phase = 1; initJavaExec(); initMethod(method); }
public SelfModifier(Method method) throws IOException { phase = 1; initJavaExec(); initMethod(method); }
3,241,573
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
3,241,574
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
3,241,575
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
3,241,576
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
public boolean autodetect () { //Checks whether a placeholder item is in the combobox //and resolve the pathes automatically: ///usr/lib/* searches all folders in usr/lib to find /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (path.endsWith("*")) { path = path.substring(0,path.length()-1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x=0;x<subdirs.length;x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches (search)) { items.add(search); } } } } else { items.add(path); } } //Now clear the combobox and add the items out of the newly //generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i=0;i<items.size();i++) { this.pathComboBox.addItem(vs.substitute((String)items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String)this.pathComboBox.getItemAt (i); if (this.pathMatches (path)) { this.pathComboBox.setSelectedIndex (i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches ((String)this.pathComboBox.getSelectedItem())) { return true; } return false; }
3,241,577
public abstract ZipOutputStream addPack(int packNumber, String name, boolean required, String description) throws Exception;
public abstract ZipOutputStream addPack(int packNumber, String name, String targetOs, boolean required, String description) throws Exception;
3,241,578
protected void addPacks(XMLElement data) throws CompilerException { notifyCompilerListener("addPacks", CompilerListener.BEGIN, data); // Initialisation XMLElement root = requireChildNamed(data, "packs"); // at least one pack is required Vector packElements = root.getChildrenNamed("pack"); if (packElements.isEmpty()) parseError(root, "<packs> requires a <pack>"); Iterator packIter = packElements.iterator(); while (packIter.hasNext()) { XMLElement el = (XMLElement) packIter.next(); // Trivial initialisations String name = requireAttribute(el, "name"); String id = el.getAttribute("id"); String description = requireChildNamed(el, "description").getContent(); boolean required = requireYesNoAttribute(el, "required"); PackInfo pack = new PackInfo(name, id, description, required); pack.setOsConstraints(OsConstraint.getOsList(el)); // TODO: unverified pack.setPreselected(validateYesNoAttribute(el, "preselected", YES)); // We get the parsables list Iterator iter = el.getChildrenNamed("parsable").iterator(); while (iter.hasNext()) { XMLElement p = (XMLElement) iter.next(); String target = requireAttribute(p, "targetfile"); String type = p.getAttribute("type", "plain"); String encoding = p.getAttribute("encoding", null); List osList = OsConstraint.getOsList(p); // TODO: unverified pack.addParsable(new ParsableFile(target, type, encoding, osList)); } // We get the executables list iter = el.getChildrenNamed("executable").iterator(); while (iter.hasNext()) { XMLElement e = (XMLElement) iter.next(); ExecutableFile executable = new ExecutableFile(); String val; // temp value executable.path = requireAttribute(e, "targetfile"); // when to execute this executable val = e.getAttribute("stage", "never"); if ("postinstall".equalsIgnoreCase(val)) executable.executionStage = ExecutableFile.POSTINSTALL; else if ("uninstall".equalsIgnoreCase(val)) executable.executionStage = ExecutableFile.UNINSTALL; // type of this executable val = e.getAttribute("type", "bin"); if ("jar".equalsIgnoreCase(val)) { executable.type = ExecutableFile.JAR; executable.mainClass = e.getAttribute("class"); // executable class } // what to do if execution fails val = e.getAttribute("failure", "ask"); if ("abort".equalsIgnoreCase(val)) executable.onFailure = ExecutableFile.ABORT; else if ("warn".equalsIgnoreCase(val)) executable.onFailure = ExecutableFile.WARN; // whether to keep the executable after executing it val = e.getAttribute("keep"); executable.keepFile = "true".equalsIgnoreCase(val); // get arguments for this executable XMLElement args = e.getFirstChildNamed("args"); if (null != args) { Iterator argIterator = args.getChildrenNamed("arg").iterator(); while (argIterator.hasNext()) { XMLElement arg = (XMLElement) argIterator.next(); executable.argList.add(requireAttribute(arg, "value")); } } executable.osList = OsConstraint.getOsList(e); // TODO: unverified pack.addExecutable(executable); } // We get the files list iter = el.getChildrenNamed("file").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { addRecursively(file, targetdir, osList, override, pack, additionals); } catch (Exception x) { parseError(f, x.getMessage(), x); } } // We get the singlefiles list iter = el.getChildrenNamed("singlefile").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String target = requireAttribute(f, "target"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { pack.addFile(file, target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } // We get the fileset list iter = el.getChildrenNamed("fileset").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String dir_attr = requireAttribute(f, "dir"); File dir = new File(dir_attr); if (! dir.isAbsolute()) dir = new File(basedir, dir_attr); if (! dir.isDirectory()) // also tests '.exists()' parseError(f, "Invalid directory 'dir': " + dir_attr); boolean casesensitive = validateYesNoAttribute(f, "casesensitive", YES); boolean defexcludes = validateYesNoAttribute(f, "defaultexcludes", YES); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); // get includes and excludes Vector xcludesList = null; String[] includes = null; xcludesList = f.getChildrenNamed("include"); if (! xcludesList.isEmpty()) { includes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); includes[j] = requireAttribute(xclude, "name"); } } String[] excludes = null; xcludesList = f.getChildrenNamed("exclude"); if (! xcludesList.isEmpty()) { excludes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); excludes[j] = requireAttribute(xclude, "name"); } } // scan and add fileset DirectoryScanner ds = new DirectoryScanner(); ds.setIncludes(includes); ds.setExcludes(excludes); if (defexcludes) ds.addDefaultExcludes(); ds.setBasedir(dir); ds.setCaseSensitive(casesensitive); ds.scan(); String[] files = ds.getIncludedFiles(); String[] dirs = ds.getIncludedDirectories(); // Directory scanner has done recursion, add files and directories for (int i = 0; i < files.length; ++i) { try { String target = new File(targetdir, files[i]).getPath(); pack.addFile(new File(dir, files[i]), target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } for (int i = 0; i < dirs.length; ++i) { try { String target = new File(targetdir, dirs[i]).getPath(); pack.addFile(new File(dir, dirs[i]), target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } } // get the updatechecks list iter = el.getChildrenNamed("updatecheck").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String casesensitive = f.getAttribute("casesensitive"); // get includes and excludes ArrayList includesList = new ArrayList(); ArrayList excludesList = new ArrayList(); // get includes and excludes Iterator include_it = f.getChildrenNamed("include").iterator(); while (include_it.hasNext()) { XMLElement inc_el = (XMLElement) include_it.next(); includesList.add(requireAttribute(inc_el, "name")); } Iterator exclude_it = f.getChildrenNamed("exclude").iterator(); while (exclude_it.hasNext()) { XMLElement excl_el = (XMLElement) exclude_it.next(); excludesList.add(requireAttribute(excl_el, "name")); } pack.addUpdateCheck( new UpdateCheck(includesList, excludesList, casesensitive)); } // We add the pack packager.addPack(pack); } notifyCompilerListener("addPacks", CompilerListener.END, data); }
protected void addPacks(XMLElement data) throws CompilerException { notifyCompilerListener("addPacks", CompilerListener.BEGIN, data); // Initialisation XMLElement root = requireChildNamed(data, "packs"); // at least one pack is required Vector packElements = root.getChildrenNamed("pack"); if (packElements.isEmpty()) parseError(root, "<packs> requires a <pack>"); Iterator packIter = packElements.iterator(); while (packIter.hasNext()) { XMLElement el = (XMLElement) packIter.next(); // Trivial initialisations String name = requireAttribute(el, "name"); String id = el.getAttribute("id"); String description = requireChildNamed(el, "description").getContent(); boolean required = requireYesNoAttribute(el, "required"); PackInfo pack = new PackInfo(name, id, description, required, loose); pack.setOsConstraints(OsConstraint.getOsList(el)); // TODO: unverified pack.setPreselected(validateYesNoAttribute(el, "preselected", YES)); // We get the parsables list Iterator iter = el.getChildrenNamed("parsable").iterator(); while (iter.hasNext()) { XMLElement p = (XMLElement) iter.next(); String target = requireAttribute(p, "targetfile"); String type = p.getAttribute("type", "plain"); String encoding = p.getAttribute("encoding", null); List osList = OsConstraint.getOsList(p); // TODO: unverified pack.addParsable(new ParsableFile(target, type, encoding, osList)); } // We get the executables list iter = el.getChildrenNamed("executable").iterator(); while (iter.hasNext()) { XMLElement e = (XMLElement) iter.next(); ExecutableFile executable = new ExecutableFile(); String val; // temp value executable.path = requireAttribute(e, "targetfile"); // when to execute this executable val = e.getAttribute("stage", "never"); if ("postinstall".equalsIgnoreCase(val)) executable.executionStage = ExecutableFile.POSTINSTALL; else if ("uninstall".equalsIgnoreCase(val)) executable.executionStage = ExecutableFile.UNINSTALL; // type of this executable val = e.getAttribute("type", "bin"); if ("jar".equalsIgnoreCase(val)) { executable.type = ExecutableFile.JAR; executable.mainClass = e.getAttribute("class"); // executable class } // what to do if execution fails val = e.getAttribute("failure", "ask"); if ("abort".equalsIgnoreCase(val)) executable.onFailure = ExecutableFile.ABORT; else if ("warn".equalsIgnoreCase(val)) executable.onFailure = ExecutableFile.WARN; // whether to keep the executable after executing it val = e.getAttribute("keep"); executable.keepFile = "true".equalsIgnoreCase(val); // get arguments for this executable XMLElement args = e.getFirstChildNamed("args"); if (null != args) { Iterator argIterator = args.getChildrenNamed("arg").iterator(); while (argIterator.hasNext()) { XMLElement arg = (XMLElement) argIterator.next(); executable.argList.add(requireAttribute(arg, "value")); } } executable.osList = OsConstraint.getOsList(e); // TODO: unverified pack.addExecutable(executable); } // We get the files list iter = el.getChildrenNamed("file").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { addRecursively(file, targetdir, osList, override, pack, additionals); } catch (Exception x) { parseError(f, x.getMessage(), x); } } // We get the singlefiles list iter = el.getChildrenNamed("singlefile").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String src = requireAttribute(f, "src"); String target = requireAttribute(f, "target"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); File file = new File(src); if (! file.isAbsolute()) file = new File(basedir, src); try { pack.addFile(file, target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } // We get the fileset list iter = el.getChildrenNamed("fileset").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String dir_attr = requireAttribute(f, "dir"); File dir = new File(dir_attr); if (! dir.isAbsolute()) dir = new File(basedir, dir_attr); if (! dir.isDirectory()) // also tests '.exists()' parseError(f, "Invalid directory 'dir': " + dir_attr); boolean casesensitive = validateYesNoAttribute(f, "casesensitive", YES); boolean defexcludes = validateYesNoAttribute(f, "defaultexcludes", YES); String targetdir = requireAttribute(f, "targetdir"); List osList = OsConstraint.getOsList(f); // TODO: unverified int override = getOverrideValue(f); Map additionals = getAdditionals(f); // get includes and excludes Vector xcludesList = null; String[] includes = null; xcludesList = f.getChildrenNamed("include"); if (! xcludesList.isEmpty()) { includes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); includes[j] = requireAttribute(xclude, "name"); } } String[] excludes = null; xcludesList = f.getChildrenNamed("exclude"); if (! xcludesList.isEmpty()) { excludes = new String[xcludesList.size()]; for (int j = 0; j < xcludesList.size(); j++) { XMLElement xclude = (XMLElement) xcludesList.get(j); excludes[j] = requireAttribute(xclude, "name"); } } // scan and add fileset DirectoryScanner ds = new DirectoryScanner(); ds.setIncludes(includes); ds.setExcludes(excludes); if (defexcludes) ds.addDefaultExcludes(); ds.setBasedir(dir); ds.setCaseSensitive(casesensitive); ds.scan(); String[] files = ds.getIncludedFiles(); String[] dirs = ds.getIncludedDirectories(); // Directory scanner has done recursion, add files and directories for (int i = 0; i < files.length; ++i) { try { String target = new File(targetdir, files[i]).getPath(); pack.addFile(new File(dir, files[i]), target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } for (int i = 0; i < dirs.length; ++i) { try { String target = new File(targetdir, dirs[i]).getPath(); pack.addFile(new File(dir, dirs[i]), target, osList, override, additionals); } catch (FileNotFoundException x) { parseError(f, x.getMessage(), x); } } } // get the updatechecks list iter = el.getChildrenNamed("updatecheck").iterator(); while (iter.hasNext()) { XMLElement f = (XMLElement) iter.next(); String casesensitive = f.getAttribute("casesensitive"); // get includes and excludes ArrayList includesList = new ArrayList(); ArrayList excludesList = new ArrayList(); // get includes and excludes Iterator include_it = f.getChildrenNamed("include").iterator(); while (include_it.hasNext()) { XMLElement inc_el = (XMLElement) include_it.next(); includesList.add(requireAttribute(inc_el, "name")); } Iterator exclude_it = f.getChildrenNamed("exclude").iterator(); while (exclude_it.hasNext()) { XMLElement excl_el = (XMLElement) exclude_it.next(); excludesList.add(requireAttribute(excl_el, "name")); } pack.addUpdateCheck( new UpdateCheck(includesList, excludesList, casesensitive)); } // We add the pack packager.addPack(pack); } notifyCompilerListener("addPacks", CompilerListener.END, data); }
3,241,579
protected void buildQuery(Session session) throws HibernateException, SQLException { PojoOptions po = new PojoOptions((Map) value(OPTIONS)); Class k = (Class) value(CLASS); if ( ! typeToAnnotationType.containsKey( k )) { throw new IllegalArgumentException( "Class "+k+" is not accepted by "+ PojosFindAnnotationsQueryDefinition.class.getName() ); } Class target = typeToAnnotationType.get((Class) value(CLASS)); String path = annotationTypeToPath.get(target); //TODO refactor into CriteriaUtils Criteria ann = session.createCriteria(target); ann.createAlias("details.owner", "ann_owner"); ann.createAlias("details.creationEvent", "ann_create"); ann.createAlias("details.updateEvent", "ann_update"); ann.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); ann.add(Restrictions.in(path+".id",(Collection) value(IDS))); Criteria obj = ann.createCriteria(path,LEFT_JOIN); obj.createAlias("details.owner", "obj_owner"); obj.createAlias("details.creationEvent", "obj_create"); obj.createAlias("details.updateEvent", "obj_update"); if (check("annotatorIds")) { Collection annotatorIds = (Collection) value("annotatorIds"); if (annotatorIds != null && annotatorIds.size() > 0) ann.add(Restrictions.in("details.id", annotatorIds )); } setCriteria( ann ); }
protected void buildQuery(Session session) throws HibernateException, SQLException { PojoOptions po = new PojoOptions((Map) value(OPTIONS)); Class k = (Class) value(CLASS); if ( ! typeToAnnotationType.containsKey( k )) { throw new IllegalArgumentException( "Class "+k+" is not accepted by "+ PojosFindAnnotationsQueryDefinition.class.getName() ); } Class target = typeToAnnotationType.get((Class) value(CLASS)); String path = annotationTypeToPath.get(target); //TODO refactor into CriteriaUtils Criteria ann = session.createCriteria(target); ann.createAlias("details.owner", "ann_owner"); ann.createAlias("details.creationEvent", "ann_create"); ann.createAlias("details.updateEvent", "ann_update"); ann.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); ann.add(Restrictions.in(path+".id",(Collection) value(IDS))); Criteria obj = ann.createCriteria(path,LEFT_JOIN); obj.createAlias("details.owner", "obj_owner"); obj.createAlias("details.creationEvent", "obj_create"); obj.createAlias("details.updateEvent", "obj_update"); if (check("annotatorIds")) { Collection annotatorIds = (Collection) value("annotatorIds"); if (annotatorIds != null && annotatorIds.size() > 0) ann.add(Restrictions.in("details.owner.id", annotatorIds )); } setCriteria( ann ); }
3,241,580
private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; while ((zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if (lastPos < 0) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if (className != null) { pos = name.indexOf(className); } if (name.length() == pos + className.length() + 6) // "Main" class // found { jis.close(); return (name.substring(0, lastPos)); } } jis.close(); return (null); }
private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; while ((zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if (lastPos < 0) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if (className != null) { pos = name.indexOf(className); } if (name.length() == pos + className.length() + 6) // "Main" class // found { jis.close(); return (name.substring(0, lastPos)); } } jis.close(); return (null); }
3,241,581
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
3,241,582
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
3,241,583
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
3,241,584
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) qDef.cdEnd; }
private void buildLUT() { if (LUT == null) init(); // Comparable assumed to be Integer //domain double dStart = getWindowStart(), dEnd = getWindowEnd(); double k = qDef.curveCoefficient; //double ys = valueMapper.transform(dStart, k); //double ye = valueMapper.transform(dEnd, k); //double a0 = qDef.bitResolution/(ye-ys); double a1 = (qDef.cdEnd-qDef.cdStart)/((double) qDef.bitResolution); int x = min; //Temporary, to come: "piece-wise rendering." QuantumMap normalize = new PolynomialMap(); int extra = 10; //double decile = (max-min)/(double) 10; //double Q1 = min+decile, Q9 = max-decile; double S1 = dStart; double ysNorm = valueMapper.transform(0, k); double yeNorm = valueMapper.transform(255, k); double aNorm = qDef.bitResolution/(yeNorm-ysNorm); double v = extra; double c0;//, nom = Q9-Q1; /* if (dStart >= Q1 && dEnd > Q9) { nom = (Q9-dStart); S1 = dStart; } else if (dStart < Q1 && dEnd <= Q9) { nom = dEnd-Q1; } else if (dStart >= Q1 && dEnd <= Q9) { nom = dEnd-dStart; S1 = dStart; } */ //c0 = (255-2*extra)/nom; c0 = (255)/(dEnd-dStart); for(; x < dStart; ++x) LUT[x-min] = (byte) qDef.cdStart; for(; x < dEnd; ++x) { //if (x > Q1) { // if (x <= Q9) v = c0*(normalize.transform(x, 1)-S1)+extra; // else v = 255-extra; //} else v = extra; v = Approximation.nearestInteger( aNorm*(valueMapper.transform(v, k)-ysNorm)); v = Approximation.nearestInteger(a1*v+qDef.cdStart); LUT[x-min] = (byte) v; } for(; x <= max; ++x) LUT[x-min] = (byte) cdEnd; }
3,241,585
public void add(InputStream in) throws Exception { // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(in)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We check the data if (!data.getName().equalsIgnoreCase("langpack")) throw new Exception("this is not an IzPack XML langpack file"); // We fill the Hashtable Vector children = data.getChildren(); int size = children.size(); for (int i = 0; i < size; i++) { XMLElement e = (XMLElement) children.get(i); String text = e.getContent(); if (text != null && !text.equals("")) { put(e.getAttribute("id"), text.trim()); } else { put(e.getAttribute("id"), e.getAttribute("txt")); } } }
public void add(InputStream in) throws Exception { // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(in)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We check the data if (!"langpack".equalsIgnoreCase(data.getName())) throw new Exception("this is not an IzPack XML langpack file"); // We fill the Hashtable Vector children = data.getChildren(); int size = children.size(); for (int i = 0; i < size; i++) { XMLElement e = (XMLElement) children.get(i); String text = e.getContent(); if (text != null && !text.equals("")) { put(e.getAttribute("id"), text.trim()); } else { put(e.getAttribute("id"), e.getAttribute("txt")); } } }
3,241,586
public void add(InputStream in) throws Exception { // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(in)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We check the data if (!data.getName().equalsIgnoreCase("langpack")) throw new Exception("this is not an IzPack XML langpack file"); // We fill the Hashtable Vector children = data.getChildren(); int size = children.size(); for (int i = 0; i < size; i++) { XMLElement e = (XMLElement) children.get(i); String text = e.getContent(); if (text != null && !text.equals("")) { put(e.getAttribute("id"), text.trim()); } else { put(e.getAttribute("id"), e.getAttribute("txt")); } } }
public void add(InputStream in) throws Exception { // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(in)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We check the data if (!data.getName().equalsIgnoreCase("langpack")) throw new Exception("this is not an IzPack XML langpack file"); // We fill the Hashtable Vector children = data.getChildren(); int size = children.size(); for (int i = 0; i < size; i++) { XMLElement e = (XMLElement) children.get(i); String text = e.getContent(); if (text != null && !"".equals(text)) { put(e.getAttribute("id"), text.trim()); } else { put(e.getAttribute("id"), e.getAttribute("txt")); } } }
3,241,587
public SoftLenderReference(Object referent) { super(referent); }
SoftLenderReference(final Object referent) { super(referent); }
3,241,588
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
3,241,589
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
3,241,590
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.queue.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
3,241,591
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
public synchronized void addObject(Object key) throws Exception { assertOpen(); if (_factory == null) { throw new IllegalStateException("Cannot add objects without a factory."); } Object obj = _factory.makeObject(key); // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; _factory.destroyObject(key, obj); } else { _factory.passivateObject(key, obj); } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.queue.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { _factory.destroyObject(key, obj); } }
3,241,592
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectQueue pool = (ObjectQueue)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
3,241,593
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new ObjectQueue(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
3,241,594
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.queue.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
3,241,595
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
3,241,596
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { pool.incrementActiveCount(); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { pool.incrementActiveCount(); return pair.value; } } } }
3,241,597
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { incrementActiveCount(key); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { incrementActiveCount(key); return pair.value; } } } }
public synchronized Object borrowObject(Object key) throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if(null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(pool.removeFirst()); if(null != pair) { _totalIdle--; } } catch(NoSuchElementException e) { /* ignored */ } // otherwise if(null == pair) { // if there is a totalMaxActive and we are at the limit then // we have to make room if ((_maxTotal > 0) && (_totalActive + _totalIdle >= _maxTotal)) { clearOldest(); } // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) int active = getActiveCount(key); if ((_maxActive < 0 || active < _maxActive) && (_maxTotal < 0 || _totalActive + _totalIdle < _maxTotal)) { Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(key); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { // this code may be executed again after a notify then continue cycle // so, need to calculate the amount of time to wait final long elapsed = (System.currentTimeMillis() - starttime); final long waitTime = _maxWait - elapsed; if (waitTime > 0) { wait(waitTime); } } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } if (newlyCreated) { pool.incrementActiveCount(); return pair.value; } else { try { _factory.activateObject(key, pair.value); } catch (Exception e) { try { _factory.destroyObject(key,pair.value); } catch (Exception e2) { // swallowed } continue; } boolean invalid = true; try { invalid = _testOnBorrow && !_factory.validateObject(key, pair.value); } catch (Exception e) { // swallowed } if (invalid) { try { _factory.destroyObject(key,pair.value); } catch (Exception e) { // swallowed } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { pool.incrementActiveCount(); return pair.value; } } } }
3,241,598
public synchronized void clear() { for(Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext(); ) { Object key = keyiter.next(); final LinkedList list = (LinkedList)(_poolMap.get(key)); for(Iterator it = list.iterator(); it.hasNext(); ) { try { _factory.destroyObject(key,((ObjectTimestampPair)(it.next())).value); } catch(Exception e) { // ignore error, keep destroying the rest } it.remove(); } } _poolMap.clear(); if (_recentlyEvictedKeys != null) { _recentlyEvictedKeys.clear(); } _totalIdle = 0; notifyAll(); }
public synchronized void clear() { for(Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext(); ) { Object key = keyiter.next(); final LinkedList list = (LinkedList)(_poolMap.get(key)); for(Iterator it = list.iterator(); it.hasNext(); ) { try { _factory.destroyObject(key,((ObjectTimestampPair)(it.next())).value); } catch(Exception e) { // ignore error, keep destroying the rest } it.remove(); } } _poolMap.clear(); if (_recentlyEvictedKeys != null) { _recentlyEvictedKeys.clear(); } _totalIdle = 0; notifyAll(); }
3,241,599
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
public synchronized void clearOldest() { // build sorted map of idle objects final Map map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
3,241,600
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
3,241,601
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
3,241,602
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); final LinkedList list = ((ObjectQueue)(_poolMap.get(key))).queue; for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); final LinkedList list = ((ObjectQueue)(_poolMap.get(key))).queue; list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
3,241,603
public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = (LinkedList)_poolMap.get(key); if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = ((ObjectQueue)_poolMap.get(key)).queue; if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
3,241,604
public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = (LinkedList)_poolMap.get(key); if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = (LinkedList)_poolMap.get(key); if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((ObjectQueue)(_poolMap.get(key))).queue.isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
3,241,605
public synchronized void invalidateObject(Object key, Object obj) throws Exception { try { _factory.destroyObject(key, obj); } catch (Exception e) { // swallowed } finally { decrementActiveCount(key); notifyAll(); // _totalActive has changed } }
public synchronized void invalidateObject(Object key, Object obj) throws Exception { try { _factory.destroyObject(key, obj); } catch (Exception e) { // swallowed } finally { ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); if(null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); } pool.decrementActiveCount(); notifyAll(); // _totalActive has changed } }
3,241,606
public synchronized void preparePool(Object key, boolean populateImmediately) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if (null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
public synchronized void preparePool(Object key, boolean populateImmediately) { ObjectQueue pool = (ObjectQueue)(_poolMap.get(key)); if (null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
3,241,607
public synchronized void preparePool(Object key, boolean populateImmediately) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if (null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
public synchronized void preparePool(Object key, boolean populateImmediately) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
3,241,608
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
3,241,609
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
3,241,610
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } pool.decrementActiveCount(); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
3,241,611
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.queue.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
3,241,612
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.queue.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
3,241,613
private boolean isJDK15(String javaVersion) { return javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6"); }
private boolean isJDK15(String javaVersion) { return TestNG.JDK_ANNOTATION_TYPE.equals(javaVersion) || javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6"); }
3,241,614
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader (new InputStreamReader (is)); this.handler = handler; }
public OutputMonitor( AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader (new InputStreamReader (is)); this.handler = handler; }
3,241,615
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader (new InputStreamReader (is)); this.handler = handler; }
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader(new InputStreamReader(is)); this.handler = handler; }
3,241,616
public void doStop () { synchronized (this.stop) { this.stop = new Boolean (true); } }
public void doStop() { synchronized (this.stop) { this.stop = new Boolean (true); } }
3,241,617
public void doStop () { synchronized (this.stop) { this.stop = new Boolean (true); } }
public void doStop () { synchronized (this.stop) { this.stop = new Boolean(true); } }
3,241,618
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
public void run() { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
3,241,619
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
3,241,620
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
3,241,621
public ExecutableFile (String fn, List args) { this.filename = fn; this.arguments = args; }
public ExecutableFile(String fn, List args) { this.filename = fn; this.arguments = args; }
3,241,622
public ExecutableFile (String fn, List args) { this.filename = fn; this.arguments = args; }
public ExecutableFile (String fn, List args) { this.filename = fn; this.arguments = args; }
3,241,623
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run( AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,624
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size() + 1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,625
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,626
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext();) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,627
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute((String) arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,628
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,629
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,630
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,631
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor(); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,632
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,633
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,634
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,635
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,636
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,637
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
3,241,638
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
private void stopMonitor(OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
3,241,639
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
3,241,640
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
3,241,641
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs);
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs);
3,241,642
public ProcessingJob (String name, List processables) { this.name = name; this.processables = processables; }
public ProcessingJob(String name, List processables) { this.name = name; this.processables = processables; }
3,241,643
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
public boolean run( AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
3,241,644
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext();) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
3,241,645
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
3,241,646
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
3,241,647
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
public ProcessPanelWorker( AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
3,241,648
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
3,241,649
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec() { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,650
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,651
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,652
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,653
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,654
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (!this.spec.hasChildren()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,655
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
3,241,656