Skip to content

Commit a8a08ac

Browse files
ctrondwalluck
andauthored
style: reformat code into a more common format (#45)
* style: reformat code into a more common format * Format with spotless-maven-plugin and eclipse Co-authored-by: David Walluck <dwalluck@redhat.com>
1 parent b8f2a7d commit a8a08ac

File tree

111 files changed

+4593
-5978
lines changed

Some content is hidden

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

111 files changed

+4593
-5978
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

core/src/main/java/org/eclipse/packager/io/FileSystemSpoolOutTarget.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016, 2019 Contributors to the Eclipse Foundation
33
*
44
* See the NOTICE file(s) distributed with this work for additional
@@ -22,23 +22,19 @@
2222
/**
2323
* A spool out target based on the local file system
2424
*/
25-
public class FileSystemSpoolOutTarget implements SpoolOutTarget
26-
{
25+
public class FileSystemSpoolOutTarget implements SpoolOutTarget {
2726
private final Path basePath;
2827

29-
public FileSystemSpoolOutTarget ( final Path basePath )
30-
{
28+
public FileSystemSpoolOutTarget(final Path basePath) {
3129
this.basePath = basePath;
3230
}
3331

3432
@Override
35-
public void spoolOut ( final String fileName, final String mimeType, final IOConsumer<OutputStream> streamConsumer ) throws IOException
36-
{
37-
final Path path = this.basePath.resolve ( fileName );
38-
Files.createDirectories ( path.getParent () );
39-
try ( OutputStream stream = new BufferedOutputStream ( Files.newOutputStream ( path ) ) )
40-
{
41-
streamConsumer.accept ( stream );
33+
public void spoolOut(final String fileName, final String mimeType, final IOConsumer<OutputStream> streamConsumer) throws IOException {
34+
final Path path = this.basePath.resolve(fileName);
35+
Files.createDirectories(path.getParent());
36+
try (OutputStream stream = new BufferedOutputStream(Files.newOutputStream(path))) {
37+
streamConsumer.accept(stream);
4238
}
4339
}
4440

core/src/main/java/org/eclipse/packager/io/IOConsumer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2015, 2019 Contributors to the Eclipse Foundation
33
*
44
* See the NOTICE file(s) distributed with this work for additional
@@ -16,7 +16,6 @@
1616
import java.io.IOException;
1717

1818
@FunctionalInterface
19-
public interface IOConsumer<T>
20-
{
21-
public void accept ( T data ) throws IOException;
19+
public interface IOConsumer<T> {
20+
public void accept(T data) throws IOException;
2221
}

core/src/main/java/org/eclipse/packager/io/IOFunction.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2015, 2019 Contributors to the Eclipse Foundation
33
*
44
* See the NOTICE file(s) distributed with this work for additional
@@ -16,7 +16,6 @@
1616
import java.io.IOException;
1717

1818
@FunctionalInterface
19-
public interface IOFunction<T, R>
20-
{
21-
public R apply ( T data ) throws IOException;
19+
public interface IOFunction<T, R> {
20+
public R apply(T data) throws IOException;
2221
}

0 commit comments

Comments
 (0)