Skip to content

Commit

Permalink
[misc] code style correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Jan 16, 2024
1 parent 5b2a40c commit 5e825c8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/mariadb/jdbc/BasePreparedStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ public void setNull(int parameterIndex, int sqlType, String typeName) throws SQL
@Override
public void setURL(int parameterIndex, URL x) throws SQLException {
checkIndex(parameterIndex);
parameters.set(parameterIndex - 1, new Parameter<>(StringCodec.INSTANCE, x == null ? null : x.toString()));
parameters.set(
parameterIndex - 1, new Parameter<>(StringCodec.INSTANCE, x == null ? null : x.toString()));
}

/**
Expand Down
20 changes: 11 additions & 9 deletions src/main/java/org/mariadb/jdbc/util/CharsetEncodingLength.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ public final class CharsetEncodingLength {

// This array stored character length for every collation
// query to generate:
// SELECT CONCAT(' maxCharlen.put(',id, ', ', maxlen, ');') FROM (
// SELECT id, maxlen
// from information_schema.character_sets, information_schema.collations
// where character_sets.character_set_name = collations.character_set_name
// UNION
// select id, maxlen
// from information_schema.character_sets, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
// where character_sets.character_set_name = COLLATION_CHARACTER_SET_APPLICABILITY.character_set_name
// order by id) sub
// SELECT CONCAT(' maxCharlen.put(',id, ', ', maxlen, ');') FROM (
// SELECT id, maxlen
// from information_schema.character_sets, information_schema.collations
// where character_sets.character_set_name = collations.character_set_name
// UNION
// select id, maxlen
// from information_schema.character_sets,
// information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
// where character_sets.character_set_name =
// COLLATION_CHARACTER_SET_APPLICABILITY.character_set_name
// order by id) sub

public static final Map<Integer, Integer> maxCharlen;

Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/mariadb/jdbc/util/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ public String getQualifier() {
* @return true if version is greater than parameters
*/
public boolean versionFixedMajorMinorGreaterOrEqual(int major, int minor, int patch) {
if (this.majorVersion == major && this.minorVersion == minor && this.patchVersion >= patch) {
return true;
}
return false;
return this.majorVersion == major && this.minorVersion == minor && this.patchVersion >= patch;
}

/**
Expand Down

0 comments on commit 5e825c8

Please sign in to comment.