Ignore:
Timestamp:
2014-06-14T12:40:50+02:00 (12 years ago)
Author:
bastiK
Message:

reworked MirroredInputStream (renamed to CachedFile):

  • no more awkwardly open and close InputStream if you just want the underlying file (e.g. to get file inside zip file)
  • make it easier to add configuration parameters, without having endless list of parameters for the constructor (Factory style, similar to ImageProvider)

breaks plugins; see #10139

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java

    r7082 r7248  
    2424import org.openstreetmap.josm.data.validation.Test;
    2525import org.openstreetmap.josm.data.validation.TestError;
    26 import org.openstreetmap.josm.io.MirroredInputStream;
     26import org.openstreetmap.josm.io.CachedFile;
    2727
    2828/**
     
    5353        if (ENGINE != null) {
    5454            try (Reader reader = new InputStreamReader(
    55                     new MirroredInputStream("resource://data/validator/opening_hours.js"), StandardCharsets.UTF_8)) {
     55                    new CachedFile("resource://data/validator/opening_hours.js").getInputStream(), StandardCharsets.UTF_8)) {
    5656                ENGINE.eval(reader);
    5757                // fake country/state to not get errors on holidays
Note: See TracChangeset for help on using the changeset viewer.