@Override public void close() throws IOException { try { reader.close(); } catch (XMLStreamException e) { throw new IOException(e); } finally { super.close(); } }
@Override public void close() throws IOException { try { reader.close(); } catch (XMLStreamException e) { throw new IOException(e); } finally { super.close(); } }
@Override public void close() throws IOException { try { super.close(); } finally { IO.delete(tmp); } }
@Override public void close() throws IOException { try { super.close(); } finally { IO.delete(tmp); } }
@Override public void close() { synchronized (cache) { WeakReference<Workspace> wsr = cache.get(getBase()); if ((wsr != null) && (wsr.get() == this)) { cache.remove(getBase()); } } projects.close(); try { super.close(); } catch (IOException e) { /* For backwards compatibility, we ignore the exception */ } }
@Override public void close() { synchronized (cache) { WeakReference<Workspace> wsr = cache.get(getBase()); if ((wsr != null) && (wsr.get() == this)) { cache.remove(getBase()); } } projects.close(); try { super.close(); } catch (IOException e) { /* For backwards compatibility, we ignore the exception */ } }
super.close(); if (dot != null) dot.close();
super.close(); if (dot != null) dot.close();
super.close(); if (dot != null) dot.close();
@Override @SuppressWarnings("cast") public void execute() throws BuildException { try { if (propertyFile.exists()) { Properties properties = new UTF8Properties(); properties.putAll((Map< ? , ? >) getProject().getProperties()); Processor processor = new Processor(properties); try { processor.setProperties(propertyFile); Project project = getProject(); Properties flattened = processor.getFlattenedProperties(); for (Iterator<Object> i = flattened.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (project.getProperty(key) == null) { project.setProperty(key, flattened.getProperty(key)); } } } finally { processor.close(); } } report(); } catch (IOException e) { e.printStackTrace(); throw new BuildException(e); } }
private DataSink d = null; private Processor processor = null; while (...) { if (...) { //interrupt transmitA processor.stop(); processor.close(); processor.deallocate(); processor = null; d.close(); d = null; transmitA(); } /*else if (...) { //interrupt transmitB processor.stop(); processor.close(); processor.deallocate(); processor = null; d.close(); d = null; transmitB.stop(); }*/ }//notation end here
/** * Calculate the file for a JAR. The default name is bsn.jar, but this can * be overridden with an * * @param jar * @return * @throws Exception */ public File getOutputFile(String bsn, String version) throws Exception { if (version == null) version = "0"; Processor scoped = new Processor(this); try { scoped.setProperty("@bsn", bsn); scoped.setProperty("@version", version.toString()); String path = scoped.getProperty(OUTPUTMASK, bsn + ".jar"); return IO.getFile(getTarget(), path); } finally { scoped.close(); } }
/** * Calculate the file for a JAR. The default name is bsn.jar, but this can * be overridden with an * * @param jar * @return * @throws Exception */ public File getOutputFile(String bsn, String version) throws Exception { if (version == null) version = "0"; Processor scoped = new Processor(this); try { scoped.setProperty("@bsn", bsn); scoped.setProperty("@version", version.toString()); String path = scoped.getProperty(OUTPUTMASK, bsn + ".jar"); return IO.getFile(getTarget(), path); } finally { scoped.close(); } }
dataSink.close(); mediaProcessor.stop(); mediaProcessor.close();
next.close(); } finally { macro.setNosystem(prev);
next.close(); } finally { macro.setNosystem(prev);
private void add(String name, String value) { if (value == null) return; Processor next = new Processor(analyzer); next.setProperty("@class", current.getFQN()); next.setProperty("@class-short", current.getClassName().getShortName()); PackageRef pref = current.getClassName().getPackageRef(); next.setProperty("@package", pref.getFQN()); Attrs info = analyzer.getClasspathExports().get(pref); if (info == null) info = analyzer.getContained().get(pref); if (info != null && info.containsKey("version")) { next.setProperty("@version", info.get("version")); } Macro macro = next.getReplacer(); /* * These strings come from code, which might also be included from * external parties. So we just do not want to call any system commands * from these sources */ boolean prev = macro.setNosystem(true); try { value = macro.process(value); headers.add(name, value); next.close(); } finally { macro.setNosystem(prev); } }
private void add(String name, String value) { if (value == null) return; Processor next = new Processor(analyzer); next.setProperty("@class", current.getFQN()); next.setProperty("@class-short", current.getClassName().getShortName()); PackageRef pref = current.getClassName().getPackageRef(); next.setProperty("@package", pref.getFQN()); Attrs info = analyzer.getClasspathExports().get(pref); if (info == null) info = analyzer.getContained().get(pref); if (info != null && info.containsKey("version")) { next.setProperty("@version", info.get("version")); } Macro macro = next.getReplacer(); /* * These strings come from code, which might also be included from * external parties. So we just do not want to call any system commands * from these sources */ boolean prev = macro.setNosystem(true); try { value = macro.process(value); headers.add(name, value); next.close(); } finally { macro.setNosystem(prev); } }