Skip to content

Commit 94e87be

Browse files
authored
Fix error handling for JNI mode unsigned numbers
Flip the assertion, the failure was in the wrong branch in JNI mode
1 parent 3d9433f commit 94e87be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftJavaTool/Commands/JExtractCommand.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ extension SwiftJava.JExtractCommand {
117117
if self.mode == .jni {
118118
switch self.unsignedNumbers {
119119
case .annotate:
120-
throw IllegalModeCombinationError("JNI mode does not support '\(JExtractUnsignedIntegerMode.wrapGuava)' Unsigned integer mode! \(Self.helpMessage)")
121-
case .wrapGuava:
122120
() // OK
121+
case .wrapGuava:
122+
throw IllegalModeCombinationError("JNI mode does not support '\(JExtractUnsignedIntegerMode.wrapGuava)' Unsigned integer mode! \(Self.helpMessage)")
123123
}
124124
} else if self.mode == .ffm {
125125
guard self.memoryManagementMode == .explicit else {

0 commit comments

Comments
 (0)