Skip to content

Commit

Permalink
GH-44016: [Java] Consider warnings as errors for Format Module (#44017)
Browse files Browse the repository at this point in the history
### Rationale for this change

This PR configs the build such that warnings are considered errors in the Format module. And corresponding code changes have also been made.

### What changes are included in this PR?

Adding flags to consider warnings as errors in javac and fixing the corresponding errors.

### Are these changes tested?

Tested by existing test cases.

### Are there any user-facing changes?

N/A
* GitHub Issue: #44016

Lead-authored-by: Vibhatha Lakmal Abeykoon <[email protected]>
Co-authored-by: Vibhatha Lakmal Abeykoon <[email protected]>
Co-authored-by: David Li <[email protected]>
Signed-off-by: Dane Pitkin <[email protected]>
  • Loading branch information
vibhatha and lidavidm authored Sep 10, 2024
1 parent b4b22a4 commit 22a4496
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions java/format/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ under the License.
</java>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.children="append">
<compilerArgs>
<arg>-Werror</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions java/format/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* limitations under the License.
*/

// TODO(https://github.com/apache/arrow/issues/44037): Google hasn't reviewed Flatbuffers fix
@SuppressWarnings({ "requires-automatic", "requires-transitive-automatic" })
module org.apache.arrow.format {
exports org.apache.arrow.flatbuf;
requires transitive flatbuffers.java;
Expand Down

0 comments on commit 22a4496

Please sign in to comment.