Skip to content
Permalink
Browse files

refactor: removing SonarLint comments

  • Loading branch information...
jgaleotti committed May 7, 2019
1 parent 6cd76ca commit 09a25b378b14df1665e081691d12689f12521c15
@@ -83,15 +83,13 @@ private static void cannotHandle(String constraintType) {
String constraintType = constraints.getString(CONSTRAINT_TYPE);
String sqlCheckExpression = constraints.getString(CHECK_EXPRESSION);
String columnList = constraints.getString(COLUMN_LIST);

DbTableConstraint constraint;
switch (constraintType) {
case UNIQUE: {
assert (sqlCheckExpression == null);
case UNIQUE:
List<String> uniqueColumnNames = Arrays.stream(columnList.split(",")).map(String::trim).collect(Collectors.toList());
DbTableUniqueConstraint uniqueConstraint = new DbTableUniqueConstraint(tableName, uniqueColumnNames);
tableCheckExpressions.add(uniqueConstraint);
}
break;
constraint = new DbTableUniqueConstraint(tableName, uniqueColumnNames);
tableCheckExpressions.add(constraint);
break;
case PRIMARY_KEY:
case PRIMARY_KEY_BLANK:
case REFERENTIAL:
@@ -100,11 +98,10 @@ private static void cannotHandle(String constraintType) {
* JDBC Metadata
**/
break;
case CHECK: {
DbTableCheckExpression constraint = new DbTableCheckExpression(tableName, sqlCheckExpression);
case CHECK:
constraint = new DbTableCheckExpression(tableName, sqlCheckExpression);
tableCheckExpressions.add(constraint);
}
break;
break;

default:
cannotHandle(constraintType);

0 comments on commit 09a25b3

Please sign in to comment.
You can’t perform that action at this time.