Skip to content

Commit 775f397

Browse files
committed
[Do not Review] PR raised for to check spotbugs report
1 parent 51ad671 commit 775f397

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@
10581058
</plugin>
10591059
</plugins>
10601060
</pluginManagement>
1061-
1061+
<!-- Do not review: Added for checking the precommits with jdk17 after merge-->
10621062
<plugins>
10631063
<plugin>
10641064
<groupId>org.apache.maven.plugins</groupId>

tez-common/src/main/java/org/apache/tez/util/FastNumberFormat.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ public StringBuilder format(long source, StringBuilder sb) {
5050
}
5151

5252
public String format(long source) {
53+
divideSafely(1);
5354
return format(source, new StringBuilder()).toString();
5455
}
56+
public void divideSafely(int denominator) {
57+
if (denominator != 0) {
58+
int x = 10 / denominator;
59+
System.out.println("Result: " + x);
60+
} else {
61+
System.out.println("Cannot divide by zero.");
62+
}
63+
}
5564
}

0 commit comments

Comments
 (0)