Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Commit 7e6cb26

Browse files
committed
Fix indentation and white spacing
1 parent 921d03e commit 7e6cb26

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+538
-505
lines changed

src/main/java/com/spotify/docker/client/AnsiProgressHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import java.util.Map;
2626

2727
/**
28-
* Parses ProgressMessage objects and writes the output to a PrintStream. The output includes
29-
* ANSI escape characters to move the cursor around to nicely print progress bars.
28+
* Parses ProgressMessage objects and writes the output to a PrintStream. The output includes ANSI
29+
* escape characters to move the cursor around to nicely print progress bars.
3030
*/
3131
public class AnsiProgressHandler implements ProgressHandler {
3232

@@ -75,6 +75,7 @@ public void progress(ProgressMessage message) throws DockerException {
7575
* Displays the upload/download status of multiple image layers the same way the docker CLI does.
7676
* The current status of each layer is show on its own line. As the status updated, we move the
7777
* cursor to the correct line, and overwrite the old status with the new one.
78+
*
7879
* @param message the ProgressMessage to parse
7980
*/
8081
private void printProgress(final ProgressMessage message) {

src/main/java/com/spotify/docker/client/ApacheUnixSocket.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
import jnr.unixsocket.UnixSocketChannel;
3636

3737
/**
38-
* Provides a socket that wraps an jnr.unixsocket.UnixSocketChannel and delays setting options
39-
* until the socket is connected. This is necessary because the Apache HTTP client attempts to
40-
* set options prior to connecting the socket, which doesn't work for Unix sockets since options
41-
* are being set on the underlying file descriptor. Until the socket is connected, the file
42-
* descriptor doesn't exist.
38+
* Provides a socket that wraps an jnr.unixsocket.UnixSocketChannel and delays setting options until
39+
* the socket is connected. This is necessary because the Apache HTTP client attempts to set options
40+
* prior to connecting the socket, which doesn't work for Unix sockets since options are being set
41+
* on the underlying file descriptor. Until the socket is connected, the file descriptor doesn't
42+
* exist.
4343
*
4444
* This class also noop's any calls to setReuseAddress, which is called by the Apache client but
4545
* isn't supported by AFUnixSocket.
@@ -95,7 +95,7 @@ public InetAddress getInetAddress() {
9595
@Override
9696
public InetAddress getLocalAddress() {
9797
try {
98-
return InetAddress.getByAddress(new byte [] {0, 0, 0, 0}); // not bound
98+
return InetAddress.getByAddress(new byte[] {0, 0, 0, 0}); // not bound
9999
} catch (UnknownHostException e) {
100100
return null;
101101
}
@@ -263,11 +263,11 @@ public synchronized void close() throws IOException {
263263
if (lingerTime > 0) {
264264
boolean sleeping = true;
265265
while (sleeping) {
266-
try {
267-
wait(lingerTime * (long) 1000);
268-
} catch (InterruptedException e) {
269-
}
270-
sleeping = false;
266+
try {
267+
wait(lingerTime * (long) 1000);
268+
} catch (InterruptedException e) {
269+
}
270+
sleeping = false;
271271
}
272272
}
273273
shutdownInput();
@@ -325,6 +325,7 @@ public void setPerformancePreferences(final int connectionTime, final int latenc
325325
}
326326

327327
interface SocketOptionSetter {
328+
328329
void run() throws SocketException;
329330
}
330331
}

src/main/java/com/spotify/docker/client/CompressedDirectory.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private CompressedDirectory(Path file) {
7878

7979
/**
8080
* The file for the created compressed directory archive.
81+
*
8182
* @return a Path object representing the compressed directory
8283
*/
8384
public Path file() {
@@ -87,8 +88,8 @@ public Path file() {
8788
/**
8889
* This method creates a gzip tarball of the specified directory. File permissions will be
8990
* retained. The file will be created in a temporary directory using the {@link
90-
* Files#createTempFile(String, String, java.nio.file.attribute.FileAttribute[])} method.
91-
* The returned object is auto-closeable, and upon closing it, the archive file will be deleted.
91+
* Files#createTempFile(String, String, java.nio.file.attribute.FileAttribute[])} method. The
92+
* returned object is auto-closeable, and upon closing it, the archive file will be deleted.
9293
*
9394
* @param directory the directory to compress
9495
* @return a Path object representing the compressed directory
@@ -280,8 +281,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
280281

281282
/**
282283
* Checks if any of the given {@link DockerIgnorePathMatcher} matches the given {@code path}
284+
*
283285
* @param matchers the {@link DockerIgnorePathMatcher} to use
284-
* @param path the path to match
286+
* @param path the path to match
285287
* @return <code>true</code> if the given path should be excluded, <code>false</code> otherwise
286288
*/
287289
private static boolean exclude(ImmutableList<DockerIgnorePathMatcher> matchers, Path path) {
@@ -347,11 +349,10 @@ private static int getModeFromPermissions(boolean read, boolean write, boolean e
347349
}
348350

349351
}
350-
352+
351353
/**
352354
* A decorator for the {@link PathMatcher} with a type to determine if it is an exclusion pattern
353-
* or an exclude to an aforementioned exclusion. See
354-
* https://docs.docker.com/engine/reference/builder/#dockerignore-file
355+
* or an exclude to an aforementioned exclusion. See https://docs.docker.com/engine/reference/builder/#dockerignore-file
355356
*/
356357
private static class DockerIgnorePathMatcher implements PathMatcher {
357358

@@ -363,11 +364,11 @@ private static class DockerIgnorePathMatcher implements PathMatcher {
363364

364365
/**
365366
* Constructor.
366-
*
367+
*
367368
* @param fileSystem the current {@link FileSystem}
368-
* @param pattern the exclusion or inclusion pattern
369-
* @param exclude flag to indicate if the given {@code pattern } is an exclusion (
370-
* <code>true</code>) or if it is an inclusion (<code>false</code>).
369+
* @param pattern the exclusion or inclusion pattern
370+
* @param exclude flag to indicate if the given {@code pattern } is an exclusion (
371+
* <code>true</code>) or if it is an inclusion (<code>false</code>).
371372
*/
372373
public DockerIgnorePathMatcher(final FileSystem fileSystem, final String pattern,
373374
final boolean exclude) {
@@ -382,7 +383,7 @@ public DockerIgnorePathMatcher(final FileSystem fileSystem, final String pattern
382383

383384
/**
384385
* @return <code>true</code> if the given {@code pattern} is an exclusion, <code>false</code> if
385-
* it is an exclude to an exclusion.
386+
* it is an exclude to an exclusion.
386387
*/
387388
public boolean isExclude() {
388389
return this.exclude;
@@ -391,8 +392,7 @@ public boolean isExclude() {
391392
/**
392393
* @param path the path to match
393394
* @return <code>true</code> if the given {@code path} starts with the pattern or matches the
394-
* pattern
395-
*
395+
* pattern
396396
* @see Path#startsWith(String)
397397
* @see PathMatcher#matches(Path)
398398
*/

0 commit comments

Comments
 (0)