Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

relates to FLUME-583 #9

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

jadlr commented Mar 29, 2011

unnecessary loop removed, removed statements that are always false, removed unreachable code

@jadlr jadlr commented on the diff Mar 29, 2011

src/java/com/cloudera/flume/handlers/text/Cursor.java
@@ -351,28 +351,11 @@ public class Cursor {
madeProgress = true;
// need char encoder to find line breaks in buf.
- lastChannelPos += (rd < 0 ? 0 : rd); // rd == -1 if at end of
@jadlr

jadlr Mar 29, 2011

rd can never be <=0 in this loop

@jadlr jadlr commented on the diff Mar 29, 2011

src/java/com/cloudera/flume/handlers/text/Cursor.java
// stream.
-
- int lastRd = 0;
- boolean progress = false;
- do {
@jadlr

jadlr Mar 29, 2011

this loop runs only once

@jadlr jadlr commented on the diff Mar 29, 2011

src/java/com/cloudera/flume/handlers/text/Cursor.java
// stream.
-
- int lastRd = 0;
- boolean progress = false;
- do {
-
- if (lastRd == -1 && rd == -1) {
- return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment