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) {