RFR [JAXP] JDK-8174025 Regression in XML Transform caused by JDK-8087303

Frank Yuan frank.yuan at oracle.com
Wed Feb 15 03:53:10 UTC 2017


Thank you very much for the check! Pushed.

Frank

> -----Original Message-----
> From: huizhe wang [mailto:huizhe.wang at oracle.com]
> Sent: Wednesday, February 15, 2017 11:35 AM
> To: Frank Yuan; 'Daniel Fuchs'
> Cc: core-libs-dev at openjdk.java.net
> Subject: Re: RFR [JAXP] JDK-8174025 Regression in XML Transform caused by JDK-8087303
> 
> Sounds good. The change to check LF only looks good.
> 
> Thanks,
> Joe
> 
> On 2/14/2017 7:22 PM, Frank Yuan wrote:
> > Hi Joe and Daniel
> >
> > I tested more and checked the code, both of you are right.
> >
> > CRLF, CR, LF in the xml file are all normalized to LF, and finally output to the platform-related line.separator if it's
serialized.
> > The serializer only handle LF as newline. User can create CR text node programmatically or there may be some case that CR is
sent to
> > the serializer intentionally, but anyway in these cases, CR is not regarded as a newline. So the change as Joe's comment and I
> > stated in previous mail is made:
> > http://cr.openjdk.java.net/~fyuan/8174025/webrev.02/
> >
> > Thanks
> > Frank
> >
> >> -----Original Message-----
> >> From: Frank Yuan [mailto:frank.yuan at oracle.com]
> >> Subject: RE: RFR [JAXP] JDK-8174025 Regression in XML Transform caused by JDK-8087303
> >>
> >>
> >>> -----Original Message-----
> >>> From: huizhe wang [mailto:huizhe.wang at oracle.com]
> >>> Subject: Re: RFR [JAXP] JDK-8174025 Regression in XML Transform caused
> >> by JDK-8087303
> >>> Looks good to me as well.
> >>>
> >>> For the CR and LF question, XML processors are required by the
> >>> specification to normalize and translate both CRLF sequence and any CR
> >>> not followed by LF to a single LF.  For that reason, you don't have
> >>> check CR since the content the serializer gets is parsed.
> >>>
> >> Thank you very much for explanation, since that, I will remove the check
> >> for CR as below:
> >> 3439c3439
> >> <                     while (skipBeginningNewlines && (text[start] == '\n'
> >> || text[start] == '\r')) {
> >> ---
> >>>                      while (skipBeginningNewlines && text[start] == '\n')
> >> {
> >> 3498c3498
> >> <                         while (skipBeginningNewlines && (text[start] ==
> >> '\n' || text[start] == '\r')) {
> >> ---
> >>>                          while (skipBeginningNewlines && text[start] ==
> >> '\n') {
> >>
> >> Once it is passed by all tests, I will push the change.
> >>
> >> Thanks
> >> Frank
> >>




More information about the core-libs-dev mailing list