Hi, > Actaully, the more i think about it, the more i want to: > > a) add an explicit test that loops over this array and fails with a clear > "your > JVM is weird and doesn't consider thi char whitespace, that's messed up and > this test and possible some other code needs updated if this is the new > Java/unicode rules" > > b) leave the plain assert you have in place as a fallback to provide a clera > assertion msg in case someone runs a test method/class that uses this utility > method but don't run the sanity check test mentioned in (a) because of - > Dtestcase or -Dtest.method.
That's fine. I will do this in the initialization block (as done in the other patch on the issue). My original "fix" was to not have a static array at all. I just made a static initializer that looped over all 16 bit char values and checked them for isWhitespace and adding them to a stringbuilder, that got converted to the char array. But Robert was not happy about that, because he argued that randomization seed would not be reproducible at all (which is correct, if you have test failure on Java 9 it does not fail on java 8, because the seed produces not the same chars). In that patch, I removed the assert completely (of course). I will change that as suggested. The assert in the StringBuilder loop can be removed completely, if we checked that before. Uwe --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
