Changeset 9798 in josm for trunk/src/org


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

fix Coverity issues 1351364 and 1351265

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r9793 r9798  
    243243        public long generateTime;
    244244        public long sortTime;
    245         public long drawTime;
    246245        public Map<Class<? extends StyleElement>, Integer> styleElementCount;
    247246        public boolean skipDraw;
     
    19611960                timeFinished = System.currentTimeMillis();
    19621961                if (benchmarkData != null) {
    1963                     benchmarkData.drawTime = timeFinished - timeGenerateDone;
    19641962                    benchmarkData.recordElementStats(allStyleElems);
    19651963                }
  • 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.