mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Consistently use while (true) instead of for (;;) across the codebase
This commit is contained in:
+3
-3
@@ -169,7 +169,7 @@ final class SubscriberInputStream extends InputStream implements Subscriber<Data
|
||||
}
|
||||
|
||||
int addWork() {
|
||||
for (;;) {
|
||||
while (true) {
|
||||
int produced = this.workAmount.getPlain();
|
||||
|
||||
if (produced == Integer.MIN_VALUE) {
|
||||
@@ -297,7 +297,7 @@ final class SubscriberInputStream extends InputStream implements Subscriber<Data
|
||||
this.available = null;
|
||||
|
||||
int actualWorkAmount = this.workAmount.getAcquire();
|
||||
for (;;) {
|
||||
while (true) {
|
||||
if (this.closed) {
|
||||
return CLOSED;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ final class SubscriberInputStream extends InputStream implements Subscriber<Data
|
||||
discard(this.available);
|
||||
this.available = null;
|
||||
|
||||
for (;;) {
|
||||
while (true) {
|
||||
int workAmount = this.workAmount.getPlain();
|
||||
DataBuffer value;
|
||||
while ((value = this.queue.poll()) != null) {
|
||||
|
||||
@@ -203,7 +203,7 @@ public final class ConcurrentLruCache<K, V> {
|
||||
* current size of the cache, unless the node has already been removed.
|
||||
*/
|
||||
private void markAsRemoved(Node<K, V> node) {
|
||||
for (; ; ) {
|
||||
while (true) {
|
||||
CacheEntry<V> current = node.get();
|
||||
if (current.state == CacheEntryState.REMOVED) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ public class OrderedMessageChannelDecorator implements MessageChannel {
|
||||
}
|
||||
|
||||
private void sendNextMessage() {
|
||||
for (;;) {
|
||||
while (true) {
|
||||
Message<?> message = this.messages.peek();
|
||||
if (message != null) {
|
||||
try {
|
||||
|
||||
@@ -190,7 +190,7 @@ final class SubscriberInputStream<T> extends InputStream implements Flow.Subscri
|
||||
}
|
||||
|
||||
int addWork() {
|
||||
for (;;) {
|
||||
while (true) {
|
||||
int produced = this.workAmount.getPlain();
|
||||
|
||||
if (produced == Integer.MIN_VALUE) {
|
||||
@@ -319,7 +319,7 @@ final class SubscriberInputStream<T> extends InputStream implements Flow.Subscri
|
||||
this.available = null;
|
||||
|
||||
int actualWorkAmount = this.workAmount.getAcquire();
|
||||
for (;;) {
|
||||
while (true) {
|
||||
if (this.closed) {
|
||||
return CLOSED;
|
||||
}
|
||||
@@ -354,7 +354,7 @@ final class SubscriberInputStream<T> extends InputStream implements Flow.Subscri
|
||||
void cleanAndFinalize() {
|
||||
this.available = null;
|
||||
|
||||
for (;;) {
|
||||
while (true) {
|
||||
int workAmount = this.workAmount.getPlain();
|
||||
T value;
|
||||
while ((value = this.queue.poll()) != null) {
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
|
||||
*/
|
||||
void cancelAndSetCompleted() {
|
||||
cancel();
|
||||
for (;;) {
|
||||
while (true) {
|
||||
State prev = this.state.get();
|
||||
if (prev == State.COMPLETED) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user