Changeset 15590 in josm for trunk/src/org


Ignore:
Timestamp:
2019-12-13T23:03:18+01:00 (5 years ago)
Author:
Don-vip
Message:

fix PMD warnings forgotten in previous commit

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r15416 r15590  
    17091709        }
    17101710
    1711         ImageInputStream stream = createImageInputStream(input);
     1711        ImageInputStream stream = createImageInputStream(input); // NOPMD
    17121712        if (stream == null) {
    17131713            throw new IIOException("Can't create an ImageInputStream!");
     
    17591759        CheckParameterUtil.ensureParameterNotNull(input, "input");
    17601760
    1761         ImageInputStream stream = createImageInputStream(input);
     1761        ImageInputStream stream = createImageInputStream(input); // NOPMD
    17621762        BufferedImage bi = read(stream, readMetadata, enforceTransparency);
    17631763        if (bi == null) {
     
    18031803
    18041804        try (InputStream istream = Utils.openStream(input)) {
    1805             ImageInputStream stream = createImageInputStream(istream);
     1805            ImageInputStream stream = createImageInputStream(istream); // NOPMD
    18061806            BufferedImage bi = read(stream, readMetadata, enforceTransparency);
    18071807            if (bi == null) {
     
    18541854        reader.setInput(stream, true, !readMetadata && !enforceTransparency);
    18551855        BufferedImage bi = null;
    1856         try {
     1856        try { // NOPMD
    18571857            bi = reader.read(0, param);
    18581858            if (bi.getTransparency() != Transparency.TRANSLUCENT && (readMetadata || enforceTransparency) && Utils.getJavaVersion() < 11) {
  • trunk/src/org/openstreetmap/josm/tools/Logging.java

    r14302 r15590  
    9595         */
    9696        public synchronized void reacquireOutputStream() {
    97             final OutputStream reacquiredStream = this.outputStreamSupplier.get();
     97            final OutputStream reacquiredStream = this.outputStreamSupplier.get(); // NOPMD
    9898
    9999            // only bother calling setOutputStream if it's actually different, as setOutputStream
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r15543 r15590  
    440440            File cachePath = Config.getDirs().getCacheDirectory(true);
    441441            Path fontconfigFile = cachePath.toPath().resolve("fontconfig.properties");
    442             OutputStream os = Files.newOutputStream(fontconfigFile);
     442            OutputStream os = Files.newOutputStream(fontconfigFile); // NOPMD
    443443            os.write(content);
    444444            try (Writer w = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) {
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r15543 r15590  
    14701470     */
    14711471    public static byte[] readBytesFromStream(InputStream stream) throws IOException {
     1472        // TODO: remove this method when switching to Java 11 and use InputStream.readAllBytes
    14721473        if (stream == null) {
    14731474            return new byte[0];
    14741475        }
    1475         try {
     1476        try { // NOPMD
    14761477            ByteArrayOutputStream bout = new ByteArrayOutputStream(stream.available());
    14771478            byte[] buffer = new byte[8192];
Note: See TracChangeset for help on using the changeset viewer.