Check codePoint for printability only when character is accessed.

#28 Merged at e77671f
Repository
maslovalex
Branch
default
Repository
asomov
Branch
default
Author
  1. maslovalex
Reviewers
Description

This prevents double access to buffer array:

  • check every character after buffer read for printability
  • access character while parsing

Still, double checking is possible with a combination of peek/prefix methods. But anyway it is much less then it was.

!NB Deviation from current behaviour: now:

  1. ReaderException(..."special characters are not allowed") is thrown only when characters are accessed.
  2. Reader, provided as constructor's parameter, 1st time used when there is a need for data.

previously:

  1. ReaderException would be thrown in StreamReader(String STR) constructor if STR contains 'special character' or when another chunk of data read from Reader.
  2. Reader, provided as constructor's parameter, 1st time accessed in constructor.
  • Commit status

Comments (0)