Skip to content

Commit

Permalink
Some sonarlint and formatting fixes
Browse files Browse the repository at this point in the history
Fixes: SIRI-951
  • Loading branch information
mkeckmkeck committed Apr 9, 2024
1 parent 4769b2a commit 96a909a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/java/sirius/db/mixing/query/QueryCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ private C parseExpression() {
skipWhitespace();

if ((reader.current().is('!') || reader.current().is('-'))) {
if (reader.next().isWhitespace() ||reader.next()
.isEndOfInput()) {
if (reader.next().isWhitespace() || reader.next().isEndOfInput()) {
// If there is a single "-" or "!" in a string like "foo - bar", we simly skip the dash
// as it is ignored by the indexing tokenizer anyway...
reader.consume();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sirius/db/mixing/query/QueryField.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public enum Mode {
EQUAL, LIKE, PREFIX, CONTAINS
}

private Mapping field;
private Mode mode;
private final Mapping field;
private final Mode mode;

private QueryField(Mapping field, Mode mode) {
this.field = field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class MongoQueryCompiler extends QueryCompiler<MongoConstraint> {
private static final Mapping FULLTEXT_MAPPING = Mapping.named("$text");

/**
* Represents an artificial field which generates a search using a <tt>$text</tt> filter. Therefore
* Represents an artificial field which generates a search using a <tt>$text</tt> filter. Therefore,
* an appropriate <b>text</b> index has to be present.
*/
public static final QueryField FULLTEXT = QueryField.contains(FULLTEXT_MAPPING);
Expand Down

0 comments on commit 96a909a

Please sign in to comment.