Skip to content

Commit c6f901f

Browse files
committed
Fix exception message
1 parent ccce387 commit c6f901f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/engineering/swat/watch/impl/mac/NativeEventStream.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,10 @@ public Strings(String... strings) {
229229

230230
public CFArrayRef toCFArray() {
231231
if (closed) {
232-
throw new IllegalStateException("Paths already deallocated");
232+
throw new IllegalStateException("Strings are already deallocated");
233+
} else {
234+
return array;
233235
}
234-
return array;
235236
}
236237

237238
private static CFStringRef[] createCFStrings(String[] pathsToWatch) {
@@ -267,7 +268,7 @@ private static CFArrayRef createCFArray(CFStringRef[] strings) {
267268
@Override
268269
public void close() {
269270
if (closed) {
270-
throw new IllegalStateException("Paths already deallocated");
271+
throw new IllegalStateException("Strings are already deallocated");
271272
} else {
272273
closed = true;
273274
}

0 commit comments

Comments
 (0)