Skip to content

Commit 4868acf

Browse files
committed
revert change to existing empty sources check
1 parent e5d29a1 commit 4868acf

File tree

1 file changed

+4
-2
lines changed
  • private/tools/java/com/github/bazelbuild/rules_jvm_external/jar

1 file changed

+4
-2
lines changed

private/tools/java/com/github/bazelbuild/rules_jvm_external/jar/MergeJars.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ public static void main(String[] args) throws IOException {
102102
}
103103
}
104104

105-
Objects.requireNonNull(out, "Output path must be set.");
106105
if (packaging == Packaging.AAR) {
107106
aarSource = sources.stream()
108107
.filter(source -> aarMatcher.matches(source.getFileName()))
@@ -121,7 +120,10 @@ public static void main(String[] args) throws IOException {
121120
}
122121
}
123122
sources.add(aarClassesJar);
124-
} else if (sources.isEmpty()) {
123+
}
124+
125+
Objects.requireNonNull(out, "Output path must be set.");
126+
if (sources.isEmpty()) {
125127
// Just write an empty jar and leave
126128
try (OutputStream fos = Files.newOutputStream(out);
127129
JarOutputStream jos = new JarOutputStream(fos)) {

0 commit comments

Comments
 (0)