Skip to content

Commit

Permalink
Clean up code.
Browse files Browse the repository at this point in the history
Change-Id: I004da0cea235401fe7324d3384969c2a1c88a8eb
  • Loading branch information
fjssilva committed Mar 28, 2024
1 parent 28c0123 commit f2727b0
Show file tree
Hide file tree
Showing 26 changed files with 128 additions and 128 deletions.
2 changes: 1 addition & 1 deletion src/main/core-api/java/com/mysql/cj/ServerVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean equals(Object obj) {
return false;
}
ServerVersion another = (ServerVersion) obj;
if (this.getMajor() != another.getMajor() || this.getMinor() != another.getMinor() || this.getSubminor() != another.getSubminor()) {
if (getMajor() != another.getMajor() || getMinor() != another.getMinor() || getSubminor() != another.getSubminor()) {
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ protected DataTruncationException(String message, Throwable cause, boolean enabl

public DataTruncationException(String message, int index, boolean parameter, boolean read, int dataSize, int transferSize, int vendorErrorCode) {
super(message);
this.setIndex(index);
this.setParameter(parameter);
this.setRead(read);
this.setDataSize(dataSize);
this.setTransferSize(transferSize);
setIndex(index);
setParameter(parameter);
setRead(read);
setDataSize(dataSize);
setTransferSize(transferSize);
setVendorCode(vendorErrorCode);
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/core-api/java/com/mysql/cj/result/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ public String toString() {
asString.append(super.toString());
asString.append("[");
asString.append("dbName=");
asString.append(this.getDatabaseName());
asString.append(getDatabaseName());
asString.append(",tableName=");
asString.append(this.getTableName());
asString.append(getTableName());
asString.append(",originalTableName=");
asString.append(this.getOriginalTableName());
asString.append(getOriginalTableName());
asString.append(",columnName=");
asString.append(this.getName());
asString.append(getName());
asString.append(",originalColumnName=");
asString.append(this.getOriginalName());
asString.append(getOriginalName());
asString.append(",mysqlType=");
asString.append(getMysqlTypeId());
asString.append("(");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public QueryBindings clone() {
newBindings.setBindValues(bvs);
newBindings.isLoadDataQuery = this.isLoadDataQuery;
newBindings.sendTypesToServer.set(this.sendTypesToServer.get());
newBindings.setLongParameterSwitchDetected(this.isLongParameterSwitchDetected());
newBindings.setLongParameterSwitchDetected(isLongParameterSwitchDetected());
return newBindings;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/core-impl/java/com/mysql/cj/NativeSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void connect(HostInfo hi, String user, String password, String database,
this.hostInfo = hi;

// reset max-rows to default value
this.setSessionMaxRows(-1);
setSessionMaxRows(-1);

// TODO do we need different types of physical connections?
SocketConnection socketConnection = new NativeSocketConnection();
Expand All @@ -153,7 +153,7 @@ public void connect(HostInfo hi, String user, String password, String database,

this.isClosed = false;

this.commandBuilder = new NativeMessageBuilder(this.getServerSession().supportsQueryAttributes());
this.commandBuilder = new NativeMessageBuilder(getServerSession().supportsQueryAttributes());
}

// TODO: this method should not be used in user-level APIs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ public void serverPrepare(String sql) throws IOException {
}

private void dumpPrepareForTestcase() {
StringBuilder buf = new StringBuilder(this.getOriginalSql().length() + 64);
StringBuilder buf = new StringBuilder(getOriginalSql().length() + 64);

this.session.getProtocol().generateQueryCommentBlock(buf);

buf.append("PREPARE debug_stmt_");
buf.append(this.statementId);
buf.append(" FROM \"");
buf.append(this.getOriginalSql());
buf.append(getOriginalSql());
buf.append("\";\n");

TestUtils.dumpTestcaseQuery(buf.toString());
Expand All @@ -82,7 +82,7 @@ public <T extends Resultset> T serverExecute(int maxRowsToRetrieve, boolean crea
private void dumpExecuteForTestcase() {
StringBuilder buf = new StringBuilder();

for (int i = 0; i < this.getParameterCount(); i++) {
for (int i = 0; i < getParameterCount(); i++) {
this.session.getProtocol().generateQueryCommentBlock(buf);

buf.append("SET @debug_stmt_param");
Expand All @@ -102,9 +102,9 @@ private void dumpExecuteForTestcase() {
buf.append("EXECUTE debug_stmt_");
buf.append(this.statementId);

if (this.getParameterCount() > 0) {
if (getParameterCount() > 0) {
buf.append(" USING ");
for (int i = 0; i < this.getParameterCount(); i++) {
for (int i = 0; i < getParameterCount(); i++) {
if (i > 0) {
buf.append(", ");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("[");

switch (this.getEventType()) {
switch (getEventType()) {
case TYPE_EXECUTE:
buf.append("EXECUTE");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public BufferedOutputStream getMysqlOutput() throws IOException {

@Override
public boolean isSSLEstablished() {
return ExportControlled.enabled() && ExportControlled.isSSLEstablished(this.getMysqlSocket());
return ExportControlled.enabled() && ExportControlled.isSSLEstablished(getMysqlSocket());
}

@Override
Expand Down
Loading

0 comments on commit f2727b0

Please sign in to comment.