Skip to content

Commit a868751

Browse files
committed
Code quality changes
1 parent 39fdc05 commit a868751

4 files changed

Lines changed: 2 additions & 30 deletions

File tree

core/src/main/java/me/zort/sqllib/SQLDatabaseConnection.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ public void close() {
191191
}
192192

193193
protected void logSqlError(Exception e) {
194-
if(isLogSqlErrors()) {
195-
e.printStackTrace();
196-
}
194+
if(isLogSqlErrors()) e.printStackTrace();
197195
}
198196

199197
}

core/src/main/java/me/zort/sqllib/internal/impl/DefaultObjectMapper.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public <T> T assignValues(Row row, Class<T> typeClass) {
5353
c.setAccessible(true);
5454
instance = (T) c.newInstance(vals);
5555
} catch(Exception ignored) {
56-
continue;
5756
}
5857
}
5958
}
@@ -72,7 +71,6 @@ public <T> T assignValues(Row row, Class<T> typeClass) {
7271
field.getName(),
7372
typeClass.getName()));
7473
} catch(Exception ignored) {
75-
continue;
7674
}
7775
}
7876
} catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {

core/src/main/java/me/zort/sqllib/internal/query/InsertQuery.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public InsertQuery table(String table) {
4747
// Used internally
4848
public InsertQuery appendVal(Object val) {
4949
String[] newValues = new String[values.length + 1];
50-
for(int i = 0; i < values.length; i++) {
51-
newValues[i] = values[i];
52-
}
50+
System.arraycopy(values, 0, newValues, 0, values.length);
5351
newValues[values.length] = handleVal(val);
5452
this.values = newValues;
5553
return this;

core/src/main/java/me/zort/sqllib/util/Regex.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)