Skip to content

Commit

Permalink
Put common case first
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Sep 14, 2024
1 parent c87721f commit cd364fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ default void close() {
* @param other the other lock to check for compatibility
*/
default boolean isCompatible(ResourceLock other) {
return other instanceof NopLock || this instanceof NopLock;
return this instanceof NopLock || other instanceof NopLock;
}

}

0 comments on commit cd364fc

Please sign in to comment.