Skip to content

Commit aa87fa7

Browse files
timeckljacomet
authored andcommitted
remove final from all method parameters
git-svn-id: https://svn.terracotta.org/repo/tc/tc-messaging/branches/private/voltron@26045 7fc7bbf3-cf45-46d4-be06-341739edd864
1 parent cf54803 commit aa87fa7

File tree

56 files changed

+333
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+333
-333
lines changed

src/main/java/com/tc/bytes/TCByteBufferFactory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static TCByteBufferFactoryConfig getConfig() {
102102
* is true TODO :: Make this the only interface and make it return fixed size buffer also make sure only
103103
* fixedBufferSize gets to the pool back.
104104
*/
105-
public static TCByteBuffer getInstance(final boolean direct, int size) {
105+
public static TCByteBuffer getInstance(boolean direct, int size) {
106106

107107
if (size > WARN_THRESHOLD) {
108108
logger.warn("Asking for a large amount of memory: " + size + " bytes");
@@ -118,7 +118,7 @@ public static TCByteBuffer getInstance(final boolean direct, int size) {
118118
}
119119
}
120120

121-
private static TCByteBuffer getFromPoolOrCreate(final boolean direct) {
121+
private static TCByteBuffer getFromPoolOrCreate(boolean direct) {
122122
return getFromPoolOrCreate(direct, 0, 1);
123123
}
124124

@@ -149,7 +149,7 @@ public static void registerThreadGroup(ThreadGroup group) {
149149
* @return an array of TCByteBuffer instances. The limit of the last buffer may be less then it's capacity to adjust
150150
* for the given length
151151
*/
152-
public static TCByteBuffer[] getFixedSizedInstancesForLength(final boolean direct, final int length) {
152+
public static TCByteBuffer[] getFixedSizedInstancesForLength(boolean direct, int length) {
153153
if (length > WARN_THRESHOLD) {
154154
logger.warn("Asking for a large amount of memory: " + length + " bytes");
155155
}
@@ -180,15 +180,15 @@ public static TCByteBuffer[] getFixedSizedInstancesForLength(final boolean direc
180180
return rv;
181181
}
182182

183-
private static int getBufferCountNeededForMessageSize(final int length) {
183+
private static int getBufferCountNeededForMessageSize(int length) {
184184
int numBuffers = length / FIXED_BUFFER_SIZE;
185185
if ((length % FIXED_BUFFER_SIZE) != 0) {
186186
numBuffers++;
187187
}
188188
return numBuffers;
189189
}
190190

191-
public static int getTotalBufferSizeNeededForMessageSize(final int length) {
191+
public static int getTotalBufferSizeNeededForMessageSize(int length) {
192192
return (getBufferCountNeededForMessageSize(length) * FIXED_BUFFER_SIZE);
193193
}
194194

src/main/java/com/tc/io/TCByteBufferInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface Mark {
2323
* Effectively the same thing as calling duplicate().limit(int), but potentially creating far less garbage (depending
2424
* on the size difference between the original stream and the slice you want)
2525
*/
26-
public TCByteBufferInput duplicateAndLimit(final int limit);
26+
public TCByteBufferInput duplicateAndLimit(int limit);
2727

2828
public TCByteBuffer[] toArray();
2929

src/main/java/com/tc/io/TCByteBufferInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public TCByteBufferInput duplicate() {
9191
* on the size difference between the original stream and the slice you want)
9292
*/
9393
@Override
94-
public TCByteBufferInput duplicateAndLimit(final int limit) {
94+
public TCByteBufferInput duplicateAndLimit(int limit) {
9595
checkClosed();
9696

9797
if (limit > available()) { throw new IllegalArgumentException("Not enough data left in stream: " + limit + " > "

src/main/java/com/tc/io/TCByteBufferOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public int getBytesWritten() {
138138
}
139139

140140
@Override
141-
public void write(byte b[], final int offset, final int length) {
141+
public void write(byte b[], int offset, int length) {
142142
checkClosed();
143143

144144
if (b == null) { throw new NullPointerException(); }

src/main/java/com/tc/l2/msg/ObjectListSyncMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public ObjectListSyncMessage(int type) {
3232
super(type);
3333
}
3434

35-
public ObjectListSyncMessage(MessageID messageID, int type, State currentState, final boolean syncAllowed, final long dataStorageSize,
36-
final long offheapSize) {
35+
public ObjectListSyncMessage(MessageID messageID, int type, State currentState, boolean syncAllowed, long dataStorageSize,
36+
long offheapSize) {
3737
super(type, messageID);
3838
this.syncAllowed = syncAllowed;
3939
this.currentState = currentState;
@@ -124,7 +124,7 @@ public static ObjectListSyncMessage createObjectListSyncRequestMessage() {
124124

125125
public static ObjectListSyncMessage createObjectListSyncResponseMessage(ObjectListSyncMessage initiatingMsg,
126126
State currentState, boolean syncAllowed,
127-
final long dataStorageSize, final long offheapSize) {
127+
long dataStorageSize, long offheapSize) {
128128
return new ObjectListSyncMessage(initiatingMsg.getMessageID(), ObjectListSyncMessage.RESPONSE, currentState,
129129
syncAllowed, dataStorageSize, offheapSize);
130130
}

src/main/java/com/tc/l2/msg/ObjectSyncMessage.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public ObjectSyncMessage() {
4848
super(-1);
4949
}
5050

51-
public ObjectSyncMessage(final ServerTransactionID stxnID, final ObjectIDSet dnaOids, final int count,
52-
final TCByteBuffer[] serializedDNAs, final ObjectStringSerializer objectSerializer,
53-
final Map<String, ObjectID> roots, final long sqID, final ObjectIDSet deletedObjectIds) {
51+
public ObjectSyncMessage(ServerTransactionID stxnID, ObjectIDSet dnaOids, int count,
52+
TCByteBuffer[] serializedDNAs, ObjectStringSerializer objectSerializer,
53+
Map<String, ObjectID> roots, long sqID, ObjectIDSet deletedObjectIds) {
5454
super(MANAGED_OBJECT_SYNC_TYPE);
5555
this.servertxnID = stxnID;
5656
this.oids = dnaOids;
@@ -63,7 +63,7 @@ public ObjectSyncMessage(final ServerTransactionID stxnID, final ObjectIDSet dna
6363
}
6464

6565
@Override
66-
protected void basicDeserializeFrom(final TCByteBufferInput in) throws IOException {
66+
protected void basicDeserializeFrom(TCByteBufferInput in) throws IOException {
6767
Assert.assertEquals(MANAGED_OBJECT_SYNC_TYPE, getType());
6868
NodeIDSerializer nodeIDSerializer = new NodeIDSerializer();
6969
nodeIDSerializer = nodeIDSerializer.deserializeFrom(in);
@@ -81,7 +81,7 @@ protected void basicDeserializeFrom(final TCByteBufferInput in) throws IOExcepti
8181
}
8282

8383
@Override
84-
protected void basicSerializeTo(final TCByteBufferOutput out) {
84+
protected void basicSerializeTo(TCByteBufferOutput out) {
8585
Assert.assertEquals(MANAGED_OBJECT_SYNC_TYPE, getType());
8686
final NodeIDSerializer nodeIDSerializer = new NodeIDSerializer(this.servertxnID.getSourceID());
8787
nodeIDSerializer.serializeTo(out);
@@ -97,15 +97,15 @@ protected void basicSerializeTo(final TCByteBufferOutput out) {
9797
deletedOids.serializeTo(out);
9898
}
9999

100-
private void writeRootsMap(final TCByteBufferOutput out) {
100+
private void writeRootsMap(TCByteBufferOutput out) {
101101
out.writeInt(this.rootsMap.size());
102102
for (Entry<String, ObjectID> entry : this.rootsMap.entrySet()) {
103103
out.writeString(entry.getKey());
104104
out.writeLong(entry.getValue().toLong());
105105
}
106106
}
107107

108-
private void readRootsMap(final TCByteBufferInput in) throws IOException {
108+
private void readRootsMap(TCByteBufferInput in) throws IOException {
109109
final int size = in.readInt();
110110
if (size == 0) {
111111
this.rootsMap = Collections.emptyMap();
@@ -117,7 +117,7 @@ private void readRootsMap(final TCByteBufferInput in) throws IOException {
117117
}
118118
}
119119

120-
private void recycle(final TCByteBuffer[] buffers) {
120+
private void recycle(TCByteBuffer[] buffers) {
121121
for (final TCByteBuffer buffer : buffers) {
122122
buffer.recycle();
123123
}

src/main/java/com/tc/l2/msg/PassiveSyncBeginMessage.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public PassiveSyncBeginMessage() {
2222
this(-1);
2323
}
2424

25-
public PassiveSyncBeginMessage(final int type) {
25+
public PassiveSyncBeginMessage(int type) {
2626
super(type);
2727
}
2828

29-
public PassiveSyncBeginMessage(final int type, final MessageID requestID) {
29+
public PassiveSyncBeginMessage(int type, MessageID requestID) {
3030
super(type, requestID);
3131
}
3232

@@ -57,14 +57,14 @@ public State getCurrentState() {
5757
}
5858

5959
@Override
60-
protected void basicDeserializeFrom(final TCByteBufferInput in) throws IOException {
60+
protected void basicDeserializeFrom(TCByteBufferInput in) throws IOException {
6161
if (getType() == RESPONSE) {
6262
currentState = new State(in.readString());
6363
}
6464
}
6565

6666
@Override
67-
protected void basicSerializeTo(final TCByteBufferOutput out) {
67+
protected void basicSerializeTo(TCByteBufferOutput out) {
6868
if (getType() == RESPONSE) {
6969
out.writeString(currentState.getName());
7070
}
@@ -84,7 +84,7 @@ private String getTypeString() {
8484
}
8585

8686
@Override
87-
public boolean equals(final Object o) {
87+
public boolean equals(Object o) {
8888
if (this == o) return true;
8989
if (o == null || getClass() != o.getClass()) return false;
9090

src/main/java/com/tc/management/remote/protocol/terracotta/JmxRemoteTunnelMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public JmxRemoteTunnelMessage(SessionID sessionID, MessageMonitor monitor, Messa
4444
}
4545

4646
@Override
47-
protected boolean hydrateValue(final byte name) throws IOException {
47+
protected boolean hydrateValue(byte name) throws IOException {
4848
switch (name) {
4949
case TUNNEL_MESSAGE:
5050
setTunneledMessage(deserializeMessage(getBytesArray()));
@@ -101,15 +101,15 @@ synchronized boolean getCloseConnection() {
101101
return flag == FIN_FLAG;
102102
}
103103

104-
synchronized void setTunneledMessage(final Object tunneledMessage) {
104+
synchronized void setTunneledMessage(Object tunneledMessage) {
105105
this.tunneledMessage = tunneledMessage;
106106
}
107107

108108
synchronized Object getTunneledMessage() {
109109
return tunneledMessage;
110110
}
111111

112-
private synchronized void setFlag(final byte flag) {
112+
private synchronized void setFlag(byte flag) {
113113
this.flag = flag;
114114
}
115115

src/main/java/com/tc/net/core/SecurityInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public SecurityInfo() {
1212
this(false, null);
1313
}
1414

15-
public SecurityInfo(final boolean secure, final String username) {
15+
public SecurityInfo(boolean secure, String username) {
1616
this.secure = secure;
1717
this.username = username;
1818
}
@@ -34,7 +34,7 @@ public String toString() {
3434
}
3535

3636
@Override
37-
public boolean equals(final Object o) {
37+
public boolean equals(Object o) {
3838
if (this == o) return true;
3939
if (o == null || getClass() != o.getClass()) return false;
4040

src/main/java/com/tc/net/core/event/TCConnectionErrorEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class TCConnectionErrorEvent extends TCConnectionEvent {
1616
private final Exception exception;
1717
private final TCNetworkMessage context;
1818

19-
public TCConnectionErrorEvent(TCConnection connection, final Exception exception, final TCNetworkMessage context) {
19+
public TCConnectionErrorEvent(TCConnection connection, Exception exception, TCNetworkMessage context) {
2020
super(connection);
2121
this.exception = exception;
2222
this.context = context;

0 commit comments

Comments
 (0)