Skip to content

Commit 0c18eab

Browse files
committed
Code formatted that are warned by checkstyle
1 parent 36ba6c3 commit 0c18eab

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

src/main/java/org/embulk/output/sftp/SftpFileOutput.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ public TaskReport commit()
172172
return Exec.newTaskReport();
173173
}
174174

175-
176175
private void closeCurrentFile()
177176
{
178177
if (currentFile == null) {

src/main/java/org/embulk/output/sftp/SftpFileOutputPlugin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public interface PluginTask
6868
@Config("sequence_format")
6969
@ConfigDefault("\"%03d.%02d.\"")
7070
public String getSequenceFormat();
71-
7271
}
7372

7473
@Override

src/test/java/org/embulk/output/sftp/TestSftpFileOutputPlugin.java

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import com.google.common.base.Charsets;
44
import com.google.common.base.Optional;
5-
import com.google.common.base.Splitter;
6-
import com.google.common.base.Throwables;
75
import com.google.common.collect.Lists;
86
import com.google.common.io.Resources;
97
import org.apache.commons.vfs2.FileSystemException;
@@ -32,7 +30,6 @@
3230
import org.embulk.spi.TransactionalPageOutput;
3331
import org.embulk.spi.time.Timestamp;
3432
import org.hamcrest.CoreMatchers;
35-
import org.hamcrest.Matcher;
3633
import org.junit.After;
3734
import org.junit.Before;
3835
import org.junit.Rule;
@@ -44,26 +41,23 @@
4441
import java.io.File;
4542
import java.io.IOException;
4643
import java.nio.file.DirectoryStream;
47-
import java.nio.file.FileSystems;
4844
import java.nio.file.Files;
4945
import java.nio.file.Path;
50-
import java.nio.file.PathMatcher;
5146
import java.nio.file.Paths;
5247
import java.security.PublicKey;
53-
import java.util.Arrays;
5448
import java.util.Collections;
5549
import java.util.List;
5650

5751
import static com.google.common.io.Files.readLines;
58-
import static org.embulk.spi.type.Types.*;
52+
import static org.embulk.spi.type.Types.BOOLEAN;
53+
import static org.embulk.spi.type.Types.DOUBLE;
54+
import static org.embulk.spi.type.Types.LONG;
55+
import static org.embulk.spi.type.Types.STRING;
56+
import static org.embulk.spi.type.Types.TIMESTAMP;
5957
import static org.hamcrest.CoreMatchers.containsString;
6058
import static org.hamcrest.CoreMatchers.hasItem;
61-
import static org.hamcrest.CoreMatchers.instanceOf;
62-
import static org.hamcrest.MatcherAssert.*;
63-
import static org.hamcrest.core.Is.is;
6459
import static org.junit.Assert.assertEquals;
65-
//import static org.hamcrest.Matchers.*;
66-
60+
import static org.junit.Assert.assertThat;
6761
public class TestSftpFileOutputPlugin
6862
{
6963
@Rule
@@ -136,7 +130,8 @@ public boolean authenticate(String username, PublicKey key, ServerSession sessio
136130
}
137131

138132
@After
139-
public void cleanup() throws InterruptedException {
133+
public void cleanup() throws InterruptedException
134+
{
140135
try {
141136
sshServer.stop(true);
142137
}
@@ -151,17 +146,19 @@ private ConfigSource getConfigFromYaml(String yaml)
151146
return loader.fromYamlString(yaml);
152147
}
153148

154-
private List<String> lsR(List<String> fileNames, Path dir) {
149+
private List<String> lsR(List<String> fileNames, Path dir)
150+
{
155151
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
156152
for (Path path : stream) {
157-
if(path.toFile().isDirectory()) {
153+
if (path.toFile().isDirectory()) {
158154
lsR(fileNames, path);
159-
} else {
155+
}
156+
else {
160157
fileNames.add(path.toAbsolutePath().toString());
161158
}
162159
}
163160
}
164-
catch(IOException e) {
161+
catch (IOException e) {
165162
logger.debug(e.getMessage(), e);
166163
}
167164
return fileNames;
@@ -215,7 +212,7 @@ private void assertRecordsInFile(String filePath)
215212
for (int i = 0; i < lines.size(); i++) {
216213
String[] record = lines.get(i).split(",");
217214
if (i == 0) {
218-
for (int j = 0; j <= 4 ; j++) {
215+
for (int j = 0; j <= 4; j++) {
219216
assertEquals("_c" + j, record[j]);
220217
}
221218
}
@@ -284,7 +281,6 @@ public void testConfigValuesIncludingDefault()
284281
// timeout
285282
// 0 second
286283

287-
288284
@Test
289285
public void testUserPasswordAndPutToUserDirectoryRoot()
290286
{
@@ -318,7 +314,6 @@ public void testUserPasswordAndPutToUserDirectoryRoot()
318314
assertRecordsInFile(String.format("%s/%s001.00.txt",
319315
testFolder.getRoot().getAbsolutePath(),
320316
pathPrefix));
321-
322317
}
323318

324319
@Test

0 commit comments

Comments
 (0)