Skip to content

Commit

Permalink
Multiple code improvements fix 1: squid:S1199, squid:S1066, squid:S18…
Browse files Browse the repository at this point in the history
…54, squid:S1165
  • Loading branch information
George Kankava committed Feb 10, 2016
1 parent ce2078a commit af5d3cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,8 @@ public void visit(PivotXml pivot) {
for (Column col : pivot.getForColumns()) {
col.accept(this);
}
if (pivot.getInSelect() != null) {
if (selectVisitor != null) {
pivot.getInSelect().accept(selectVisitor);
}
if (pivot.getInSelect() != null && selectVisitor != null) {
pivot.getInSelect().accept(selectVisitor);
}
}

Expand Down
22 changes: 9 additions & 13 deletions src/main/java/net/sf/jsqlparser/expression/OracleHint.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,16 @@ public static boolean isHintMatch(String comment) {

public final void setComment(String comment) {
Matcher m;
{
m = SINGLE_LINE.matcher(comment);
if (m.find()) {
this.value = m.group(1);
this.singleLine = true;
return;
}
m = SINGLE_LINE.matcher(comment);
if (m.find()) {
this.value = m.group(1);
this.singleLine = true;
return;
}
{
m = MULTI_LINE.matcher(comment);
if (m.find()) {
this.value = m.group(1);
this.singleLine = false;
}
m = MULTI_LINE.matcher(comment);
if (m.find()) {
this.value = m.group(1);
this.singleLine = false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public String getStringExpression() {
return "!~";
case NOT_MATCH_CASEINSENSITIVE:
return "!~*";
default:
break;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void setIfNotExists(boolean ifNotExists) {

@Override
public String toString() {
String sql = "";
String sql;
String createOps = PlainSelect.getStringList(createOptionsStrings, false, false);

sql = "CREATE " + (unlogged ? "UNLOGGED " : "") +
Expand Down

0 comments on commit af5d3cd

Please sign in to comment.