Skip to content

Commit ec74d4a

Browse files
author
David R. MacIver
committed
more removal of trailing whitespace
1 parent 9e00d93 commit ec74d4a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/com/rabbitmq/utility/IntAllocator.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
*/
3838
public class IntAllocator{
3939

40-
// Invariant: Sorted in order of first element.
41-
// Invariant: Intervals are non-overlapping, non-adjacent.
42-
// This could really use being a balanced binary tree. However for normal
40+
// Invariant: Sorted in order of first element.
41+
// Invariant: Intervals are non-overlapping, non-adjacent.
42+
// This could really use being a balanced binary tree. However for normal
4343
// usages it doesn't actually matter.
4444
private IntervalList base;
4545

@@ -116,12 +116,12 @@ public static IntervalList fromArray(int[] xs, int length){
116116

117117

118118
/**
119-
* Creates an IntAllocator allocating integer IDs within the inclusive range
119+
* Creates an IntAllocator allocating integer IDs within the inclusive range
120120
* [start, end]
121121
*/
122122
public IntAllocator(int start, int end){
123-
if(start > end)
124-
throw new IllegalArgumentException("illegal range [" + start +
123+
if(start > end)
124+
throw new IllegalArgumentException("illegal range [" + start +
125125
", " + end + "]");
126126

127127
// Fairly arbitrary heuristic for a good size for the unsorted set.
@@ -148,7 +148,7 @@ public int allocate(){
148148
/**
149149
* Make the provided integer available for allocation again. This operation
150150
* runs in amortized O(sqrt(range size)) time: About every sqrt(range size)
151-
* operations will take O(range_size + number of intervals) to complete
151+
* operations will take O(range_size + number of intervals) to complete
152152
* and the rest run in constant time.
153153
*
154154
* No error checking is performed, so if you double free or free an integer
@@ -162,11 +162,11 @@ public void free(int id){
162162
}
163163

164164
/**
165-
* Attempt to reserve the provided ID as if it had been allocated. Returns
165+
* Attempt to reserve the provided ID as if it had been allocated. Returns
166166
* true if it is available, false otherwise.
167167
*
168-
* This operation runs in O(id) in the worst case scenario, though it can
169-
* usually be expected to perform better than that unless a great deal of
168+
* This operation runs in O(id) in the worst case scenario, though it can
169+
* usually be expected to perform better than that unless a great deal of
170170
* fragmentation has occurred.
171171
*/
172172
public boolean reserve(int id){

test/src/com/rabbitmq/client/test/ChannelNumberAllocationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import junit.framework.TestCase;
55
import java.util.*;
66

7-
public class ChannelNumberAllocationTests extends TestCase{
7+
public class ChannelNumberAllocationTests extends TestCase{
88
static int CHANNEL_COUNT = 100;
99
static Comparator<Channel> COMPARATOR = new Comparator<Channel>(){
1010
public int compare(Channel x, Channel y){
@@ -64,7 +64,7 @@ public void testAllocateAfterFreeingMany() throws Exception{
6464

6565
public void testAllocateAfterManualAssign() throws Exception{
6666
connection.createChannel(10);
67-
67+
6868
for(int i = 0; i < 20; i++)
6969
assertTrue(10 != connection.createChannel().getChannelNumber());
7070
}

0 commit comments

Comments
 (0)