Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: diffplug/spotless
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 553cffe7122034c52b737f321557188ff5eab27f
Choose a base ref
..
head repository: diffplug/spotless
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 52a7a6c1af0ce605b34811ec030c0c0aee13905c
Choose a head ref
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/src/main/java/com/diffplug/spotless/npm/NpmResourceHelper.java
Original file line number Diff line number Diff line change
@@ -15,11 +15,7 @@
*/
package com.diffplug.spotless.npm;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.time.Duration;
@@ -28,7 +24,6 @@
import com.diffplug.spotless.ThrowingEx;

final class NpmResourceHelper {

private NpmResourceHelper() {
// no instance required
}
@@ -37,8 +32,7 @@ static void writeUtf8StringToFile(File file, String stringToWrite) throws IOExce
Files.write(file.toPath(), stringToWrite.getBytes(StandardCharsets.UTF_8));
}

static void writeUtf8StringToOutputStream(String stringToWrite, OutputStream outputStream)
throws IOException {
static void writeUtf8StringToOutputStream(String stringToWrite, OutputStream outputStream) throws IOException {
final byte[] bytes = stringToWrite.getBytes(StandardCharsets.UTF_8);
outputStream.write(bytes);
}