Hi,

On 09/09/2019 15:35, Roger Riggs wrote:
- Is the use of AtomicBoolean due to concurrency concerns?
   If not, a new boolean[1] would be less overhead

Alternatively, BufferedReader could define an empty package
method called e.g.

   void endOfLine() { };

that LineNumberReader could override to increment lineNumber.

So:

 351                         if (term != null) term.set(true);

would simply become

 351                         endOfLine();

which would be a no-op for BufferedReader but would increment
lineNumber for LineNumberReader.

Wouldn't that work too?

best regards

-- daniel

Reply via email to