File tree Expand file tree Collapse file tree
jflyte/src/main/java/org/flyte/jflyte Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 <name >Flytekit Java Examples in Scala</name >
3030 <description >Examples of Tasks, Workflows and Launch plans written in Scala.</description >
3131
32- <properties >
33- <!-- spotbugs doesn't understand Scala code -->
34- <spotbugs .skip>true</spotbugs .skip>
35- </properties >
36-
3732 <dependencyManagement >
3833 <dependencies >
3934 <dependency >
Original file line number Diff line number Diff line change 3232 macro expansion that can't be done
3333 in the same module.</description >
3434
35- <properties >
36- <!-- spotbugs doesn't understand Scala code -->
37- <spotbugs .skip>true</spotbugs .skip>
38- </properties >
39-
4035 <dependencyManagement >
4136 <dependencies >
4237 <dependency >
Original file line number Diff line number Diff line change 3131 <description >Classes used by developers to build Flyte's Tasks, Workflows and Launch plans in
3232 Scala 2.12.</description >
3333
34- <properties >
35- <!-- spotbugs doesn't understand Scala code -->
36- <spotbugs .skip>true</spotbugs .skip>
37- </properties >
38-
3934 <dependencyManagement >
4035 <dependencies >
4136 <dependency >
Original file line number Diff line number Diff line change 3131 <description >Classes used by developers to build Flyte's Tasks, Workflows and Launch plans in
3232 Scala 2.13.</description >
3333
34- <properties >
35- <!-- spotbugs doesn't understand Scala code -->
36- <spotbugs .skip>true</spotbugs .skip>
37- </properties >
38-
3934 <dependencyManagement >
4035 <dependencies >
4136 <dependency >
Original file line number Diff line number Diff line change 1818
1919import static org .flyte .jflyte .utils .TokenSourceFactoryLoader .getTokenSource ;
2020
21- import com .google .errorprone .annotations .Var ;
2221import com .google .protobuf .ByteString ;
2322import java .io .File ;
2423import java .io .FileOutputStream ;
@@ -102,23 +101,11 @@ public Integer call() {
102101
103102 private static BiConsumer <String , ByteString > fileWriter (String folder ) {
104103 return (filename , bytes ) -> {
105- @ Var FileOutputStream fos = null ;
106-
107- // ugly because spotbugs doesn't like try-with-resources
108- try {
109- fos = new FileOutputStream (new File (folder , filename ));
104+ try (FileOutputStream fos = new FileOutputStream (new File (folder , filename ))) {
110105 bytes .writeTo (fos );
111106 fos .flush ();
112107 } catch (IOException e ) {
113108 throw new UncheckedIOException ("failed to write to " + folder + "/" + filename , e );
114- } finally {
115- if (fos != null ) {
116- try {
117- fos .close ();
118- } catch (IOException e ) {
119- // ignore, any significant error should happen during flush
120- }
121- }
122109 }
123110 };
124111 }
Original file line number Diff line number Diff line change 107107 <sl4j .version>1.7.36</sl4j .version>
108108 <!-- also remember to bump the version in flytekit-bom module -->
109109 <spotless .version>2.21.0</spotless .version>
110- <spotbugs .excludeFilterFile>spotbugs-exclude.xml</spotbugs .excludeFilterFile>
111110 <error_prone .version>2.27.0</error_prone .version>
112111 <junit .version>5.7.0</junit .version>
113112
593592 </execution >
594593 </executions >
595594 </plugin >
596- <plugin >
597- <groupId >com.github.spotbugs</groupId >
598- <artifactId >spotbugs-maven-plugin</artifactId >
599- <version >4.2.3</version >
600- <configuration >
601- <includeTests >true</includeTests >
602- <effort >Max</effort >
603- <threshold >Low</threshold >
604- <failOnError >true</failOnError >
605- <xmlOutput >true</xmlOutput >
606- </configuration >
607- <executions >
608- <execution >
609- <goals >
610- <goal >check</goal >
611- </goals >
612- <phase >verify</phase >
613- </execution >
614- </executions >
615- </plugin >
616595 <plugin >
617596 <artifactId >maven-javadoc-plugin</artifactId >
618597 <version >3.3.1</version >
766745 <groupId >com.diffplug.spotless</groupId >
767746 <artifactId >spotless-maven-plugin</artifactId >
768747 </plugin >
769- <plugin >
770- <groupId >com.github.spotbugs</groupId >
771- <artifactId >spotbugs-maven-plugin</artifactId >
772- </plugin >
773748 <plugin >
774749 <groupId >org.apache.rat</groupId >
775750 <artifactId >apache-rat-plugin</artifactId >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments