Skip to content

Commit

Permalink
[Java] Apply checkstyle rule for do while loops.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Feb 2, 2017
1 parent 7692d74 commit d22b8e6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ int doWork(ImageArchivingSession session)
return 0;
}
};

abstract int doWork(ImageArchivingSession session);
}

Expand Down Expand Up @@ -285,11 +286,12 @@ int doWork()
{
initialState = state();
workDone += state().doWork(this);
} while (initialState != state());
}
while (initialState != state());

return workDone;
}


Image image()
{
return image;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ int doWork()
{
initialState = state();
workDone += state().doWork(this);
} while (initialState != state());
}
while (initialState != state());

return workDone;
}

Expand All @@ -301,7 +303,6 @@ private void state(State state)
this.state = state;
}


void close()
{
state(State.CLOSE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ private void validateReplay()
}
this.fragmentCount++;
this.nextMessage += frameLength;
} while (messageStart + frameLength < offset + length);
}
while (messageStart + frameLength < offset + length);

delivered -= length;

}, 1);
Expand Down Expand Up @@ -390,6 +392,7 @@ private void trackArchiveProgress(int messageCount, CountDownLatch waitForData)

waitForData.countDown();
});

t.setDaemon(true);
t.start();
}
Expand Down
1 change: 1 addition & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens" value="LITERAL_ELSE, LITERAL_DO, LITERAL_WHILE"/>
</module>

<module name="EmptyStatement"/>
Expand Down

0 comments on commit d22b8e6

Please sign in to comment.