Skip to content

Commit

Permalink
Fix issue #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Cher committed Feb 5, 2013
1 parent b4de966 commit 0dc6bb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hrider/hbase/QueryScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected Scan getScanner() throws IOException {
@Override
protected boolean isValidRow(Result row) {
Query localQuery = this.query;
if (localQuery != null && localQuery.getFamily() != null && localQuery.getColumn() != null) {
if (localQuery != null && localQuery.getWord() != null) {
return row.containsColumn(Bytes.toBytesBinary(localQuery.getFamily()), Bytes.toBytesBinary(localQuery.getColumn()));
}
return true;
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/hrider/ui/forms/ScanDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ public Query getQuery() {
query.setColumn(parts[1]);

query.setOperator((Operator)this.comboBoxOperator.getSelectedItem());
query.setWord(this.textFieldWord.getText().trim());
query.setWordType((ObjectType)this.comboBoxWordType.getSelectedItem());

if (!this.textFieldWord.getText().trim().isEmpty()) {
query.setWord(this.textFieldWord.getText().trim());
query.setWordType((ObjectType)this.comboBoxWordType.getSelectedItem());
}

return query;
}
Expand Down

0 comments on commit 0dc6bb3

Please sign in to comment.