Ignore:
Timestamp:
2016-09-04T02:22:44+02:00 (4 years ago)
Author:
Don-vip
Message:

simplify uses of PrintWriter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java

    r10616 r10952  
    88import java.io.ByteArrayInputStream;
    99import java.io.File;
    10 import java.io.FileOutputStream;
    1110import java.io.FilenameFilter;
    1211import java.io.IOException;
    1312import java.io.InputStream;
    14 import java.io.OutputStreamWriter;
    1513import java.io.PrintWriter;
    1614import java.net.MalformedURLException;
     
    236234        File cacheFile = createSiteCacheFile(pluginDir, site);
    237235        getProgressMonitor().subTask(tr("Writing plugin list to local cache ''{0}''", cacheFile.toString()));
    238         try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), StandardCharsets.UTF_8))) {
     236        try (PrintWriter writer = new PrintWriter(cacheFile, StandardCharsets.UTF_8.name())) {
    239237            writer.write(list);
    240238            writer.flush();
Note: See TracChangeset for help on using the changeset viewer.