Skip to content

Commit 14a8161

Browse files
committed
Fixed checkstyle violations
1 parent 1f4fe85 commit 14a8161

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/EventDeserializer.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ private <T extends EventDataDeserializer> T wrapEventDataDeserializer(EventType
146146
private <T> T newInstanceUnchecked(Class<T> eventDataDeserializerClass) {
147147
try {
148148
return eventDataDeserializerClass.newInstance();
149-
} catch (InstantiationException e) { throw new RuntimeException(e); }
150-
catch (IllegalAccessException e) { throw new RuntimeException(e); }
149+
} catch (InstantiationException e) {
150+
throw new RuntimeException(e);
151+
} catch (IllegalAccessException e) {
152+
throw new RuntimeException(e);
153+
}
151154
}
152155

153156
/**
@@ -244,11 +247,7 @@ public EventData getExternal() {
244247

245248
@Override
246249
public String toString() {
247-
final StringBuilder sb = new StringBuilder("InternalEventData");
248-
sb.append("{internal=").append(internal);
249-
sb.append(", external=").append(external);
250-
sb.append('}');
251-
return sb.toString();
250+
return "EventDataWrapper{" + "internal=" + internal + ", external=" + external + '}';
252251
}
253252

254253
/**

src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/FormatDescriptionEventDataDeserializer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ public int compare(String l, String r) {
6666
if (ll > rl) {
6767
return -1 * compare(r, l);
6868
}
69-
for (di = 0, dc = 0; di < ll && (dc = l.charAt(di) - r.charAt(di)) == 0; di++);
69+
for (di = 0, dc = 0; di < ll && (dc = l.charAt(di) - r.charAt(di)) == 0; di++) { }
7070
if (di == ll) {
7171
return ll - rl;
7272
}
7373
if (Character.isDigit(l.charAt(di))) {
7474
if (Character.isDigit(r.charAt(di))) {
7575
int lnl = 0, rnl = 0;
76-
for (int j = di + 1; j < ll && Character.isDigit(l.charAt(j)); j++, lnl++);
76+
for (int j = di + 1; j < ll && Character.isDigit(l.charAt(j)); j++, lnl++) { }
7777
for (int j = di + 1, e = Math.min(j + lnl + 1, rl);
78-
j < e && Character.isDigit(r.charAt(j)); j++, rnl++);
78+
j < e && Character.isDigit(r.charAt(j)); j++, rnl++) { }
7979
return lnl == rnl ? dc : lnl - rnl;
8080
}
8181
return 1;

0 commit comments

Comments
 (0)