replace 'for (;;)' with 'while (true)'

This commit is contained in:
Stepan Koltsov
2012-05-11 16:26:26 +04:00
parent 39ec3f7c14
commit aa4252462f
5 changed files with 7 additions and 7 deletions
@@ -318,7 +318,7 @@ public class DescriptorUtils {
public static List<DeclarationDescriptor> getPathWithoutRootNsAndModule(@NotNull DeclarationDescriptor descriptor) {
List<DeclarationDescriptor> path = Lists.newArrayList();
DeclarationDescriptor current = descriptor;
for (;;) {
while (true) {
if (current instanceof NamespaceDescriptor && isRootNamespace((NamespaceDescriptor) current)) {
return Lists.reverse(path);
}
@@ -196,7 +196,7 @@ public class FqNameUnsafe {
FqNameUnsafe last = new FqNameUnsafe(firstSegment, FqName.ROOT.toUnsafe(), firstSegment);
callback.segment(firstSegment, last);
for (;;) {
while (true) {
int next = fqName.indexOf('.', pos + 1);
if (next < 0) {
if (this.parent == null) {
@@ -52,7 +52,7 @@ class NamespaceComparator {
@NotNull File txtFile) {
String serialized = new NamespaceComparator(includeObject).doCompareNamespaces(nsa, nsb);
try {
for (;;) {
while (true) {
String expected = Files.toString(txtFile, Charset.forName("utf-8")).replace("\r\n", "\n");
if (expected.contains("kick me")) {
@@ -549,7 +549,7 @@ class NamespaceComparator {
try {
StringBuilder r = new StringBuilder();
BufferedReader reader = new BufferedReader(new StringReader(string));
for (;;) {
while (true) {
String line = reader.readLine();
if (line == null) {
break;
@@ -33,7 +33,7 @@ public class LockPerf {
for (int i = 0; i < threadNum; ++i) {
new Thread(new Runnable() {
public void run() {
for (;;) {
while (true) {
lock.lock();
try {
if (counter.get() == 100000000) {
@@ -181,7 +181,7 @@ public class JetSignatureReader {
start = pos;
visited = false;
inner = false;
for (;;) {
while (true) {
switch (c = signature.charAt(pos++)) {
case '.':
case ';':
@@ -212,7 +212,7 @@ public class JetSignatureReader {
v.visitClassType(name, nullable, forceReal);
}
visited = true;
top: for (;;) {
top: while (true) {
switch (c = signature.charAt(pos)) {
case '>':
break top;