1414
1515@ SuppressWarnings ("WeakerAccess" )
1616public class ConversionResult {
17+
1718 private final ConversionResponse response ;
1819
1920 @ SuppressWarnings ("unused" )
@@ -27,8 +28,11 @@ public Integer fileCount() {
2728 }
2829
2930 public List <String > urls () {
30- @ SuppressWarnings ("unchecked" ) List <String > valueList = new ArrayList ();
31- for (ConversionResponseFile file : response .Files ) valueList .add (file .Url );
31+ @ SuppressWarnings ("unchecked" )
32+ List <String > valueList = new ArrayList ();
33+ for (ConversionResponseFile file : response .Files ) {
34+ valueList .add (file .Url );
35+ }
3236 return valueList ;
3337 }
3438
@@ -38,7 +42,9 @@ public Integer conversionCost() {
3842 }
3943
4044 public ConversionResultFile getFile (int index ) {
41- if (index < 0 ) index = response .Files .length + index ;
45+ if (index < 0 ) {
46+ index = response .Files .length + index ;
47+ }
4248 return new ConversionResultFile (response .Files [index ]);
4349 }
4450
@@ -52,8 +58,9 @@ public CompletableFuture<Path> saveFile(Path file) {
5258
5359 @ SuppressWarnings ("WeakerAccess" )
5460 public List <CompletableFuture <Path >> saveFiles (Path directory ) {
55- if (!Files .isDirectory (directory ))
61+ if (!Files .isDirectory (directory )) {
5662 throw new RuntimeException ("Directory expected, but received: " + directory .toString ());
63+ }
5764 List <CompletableFuture <Path >> paths = new ArrayList <>();
5865 for (int i = 0 ; i < response .Files .length ; i ++) {
5966 paths .add (getFile (i ).saveFile (directory ));
@@ -92,4 +99,4 @@ public void deleteSync() {
9299 }
93100 });
94101 }
95- }
102+ }
0 commit comments