Ignore:
Timestamp:
2016-02-14T20:33:49+01:00 (5 years ago)
Author:
stoecker
Message:

fix Coverity issues 1351364 and 1351265

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java

    r9783 r9798  
    6161     */
    6262    public static void validateXML(Reader in) throws IOException, SAXException {
    63         try (InputStream xsdStream = new CachedFile("resource://data/preferences.xsd").getInputStream()) {
     63        try (CachedFile cf = new CachedFile("resource://data/preferences.xsd"); InputStream xsdStream = cf.getInputStream()) {
    6464            Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(xsdStream));
    6565            Validator validator = schema.newValidator();
Note: See TracChangeset for help on using the changeset viewer.