Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-15 Thread Roger Riggs
Hi Brian, Looks fine to me. Thanks, Roger On 4/15/2015 2:41 PM, Brian Burkhalter wrote: Updated and hopefully final patch here: http://cr.openjdk.java.net/~bpb/8075156/webrev.02/ Test run in progress. Barring any objections I assume that changing CODE_POINT_U from a String to an int d

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-15 Thread Brian Burkhalter
Updated and hopefully final patch here: http://cr.openjdk.java.net/~bpb/8075156/webrev.02/ Test run in progress. Barring any objections I assume that changing CODE_POINT_U from a String to an int does not require another Reviewer approval, so I will go ahead and push the fix after the yet

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-15 Thread Brian Burkhalter
Hi Roger, On Apr 15, 2015, at 9:50 AM, Roger Riggs wrote: > Looks fine as is. Thanks for reviewing it. > But I'm curious why CODE_POINT_U000 is defined as String instead of char? > The indexOf() operation is more efficient for single characters. Probably because I had initially used contains

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-15 Thread Roger Riggs
Hi Brian, Looks fine as is. But I'm curious why CODE_POINT_U000 is defined as String instead of char? The indexOf() operation is more efficient for single characters. Thanks, Roger On 4/14/2015 5:56 PM, Brian Burkhalter wrote: Please review at your convenience this latest patch modified fro

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-14 Thread Brian Burkhalter
Please review at your convenience this latest patch modified from the previous one pursuant to the most recent comments. Issue: https://bugs.openjdk.java.net/browse/JDK-8075156 Patch: http://cr.openjdk.java.net/~bpb/8075156/webrev.01/ Summary: * Revise Preferences javadoc to indicate IAE for

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-14 Thread Brian Burkhalter
Hi Roger, Thanks for taking the time to review this recap. Your suggestion to forge ahead with the approach already taken seems to be reasonable. I concur that a fail-fast approach of throwing an IAE as soon as the bad character is encountered if preferable to waiting for some inscrutable subse

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-14 Thread Roger Riggs
Hi Brian, Thanks for digging deeper and the recap. I don't see any cases in which it is necessary or valuable to allow \0 in Strings (key or value). The original bug report did not indicate whether it was discovered as a testing exercise or when diagnosing a bug in an application. The compat

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-10 Thread Brian Burkhalter
On Apr 4, 2015, at 12:53 PM, Alan Bateman wrote: > On 24/03/2015 19:20, Brian Burkhalter wrote: >> Please review at your convenience. >> >> Issue: https://bugs.openjdk.java.net/browse/JDK-8075156 >> Patch: http://cr.openjdk.java.net/~bpb/8075156/webrev.00/ >> >> This is a sequel to

Re: [9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-04-04 Thread Alan Bateman
On 24/03/2015 19:20, Brian Burkhalter wrote: Please review at your convenience. Issue: https://bugs.openjdk.java.net/browse/JDK-8075156 Patch: http://cr.openjdk.java.net/~bpb/8075156/webrev.00/ This is a sequel to the resolved issue https://bugs.openjdk.java.net/browse/JDK-8068373, (prefs) F

[9] RFR of 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key

2015-03-24 Thread Brian Burkhalter
Please review at your convenience. Issue: https://bugs.openjdk.java.net/browse/JDK-8075156 Patch: http://cr.openjdk.java.net/~bpb/8075156/webrev.00/ This is a sequel to the resolved issue https://bugs.openjdk.java.net/browse/JDK-8068373, (prefs) FileSystemPreferences writes \0 to XML storage,