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 May 14, 2020
1 parent 30cb8c2 commit eb6ce24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Expand Up @@ -1457,9 +1457,7 @@ public void setTimeout(int timeout) throws SocketException {
* @throws SQLException If socket error.
*/
public void setReadonly(final boolean readOnly) throws SQLException {
if (options.assureReadOnly
&& this.readOnly != readOnly
&& versionGreaterOrEqual(5, 6, 5)) {
if (options.assureReadOnly && this.readOnly != readOnly && versionGreaterOrEqual(5, 6, 5)) {
executeQuery("SET SESSION TRANSACTION " + (readOnly ? "READ ONLY" : "READ WRITE"));
}
this.readOnly = readOnly;
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/mariadb/jdbc/internal/util/Utils.java
Expand Up @@ -807,9 +807,7 @@ private static void writeHex(
outputBuilder.append(" ");
}
if (posHexa == 16) {
outputBuilder.append("| ")
.append(hexaValue)
.append(" |\n");
outputBuilder.append("| ").append(hexaValue).append(" |\n");
if (pos + 1 != dataLength + offset) outputBuilder.append("| ");
posHexa = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mariadb/jdbc/util/DefaultOptions.java
Expand Up @@ -307,7 +307,7 @@ public enum DefaultOptions {
Boolean.FALSE,
"1.3.0",
"Ensure that when Connection.setReadOnly(true) is called, host is in read-only mode by "
+ "setting the session transaction to read-only.",
+ "setting the session transaction to read-only.",
false),
USE_LEGACY_DATETIME_CODE(
"useLegacyDatetimeCode",
Expand Down

0 comments on commit eb6ce24

Please sign in to comment.