RFR (JAXP) 8170556: Warnings cleanup related to JDK-8167340

Langer, Christoph christoph.langer at sap.com
Wed Dec 14 07:53:00 UTC 2016


Thanks, Joe.

Overall, this looks better.

> -----Original Message-----
> From: Joe Wang [mailto:huizhe.wang at oracle.com]
> Sent: Mittwoch, 14. Dezember 2016 01:42
> To: Langer, Christoph <christoph.langer at sap.com>
> Cc: core-libs-dev at openjdk.java.net
> Subject: Re: RFR (JAXP) 8170556: Warnings cleanup related to JDK-8167340
> 
> Thanks Christoph!
> 
> I updated the webrev for the classes you mentioned below, in a few
> cases, used NetBeans' source format feature -- not for all of the
> classes though (esp. the crazily large
> XMLDocumentFragmentScannerImpl.java, it gets better though, overtime).
> 
> http://cr.openjdk.java.net/~joehw/jdk9/8170556/webrev/
> 
> Best regards,
> Joe
> 
> On 12/13/16, 2:14 PM, Langer, Christoph wrote:
> > Hi Joe,
> >
> > looks nice, thanks for doing that.
> >
> > Here are a few findings:
> >
> >
> src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLStre
> amReaderImpl.java:
> > ->  import statements could be ordered alphabetically
> > 262         fEntityScanner = fEntityManager.getEntityScanner()  ;
> > ->  spaces before ;
> > 1317     protected List<EntityDeclaration>  getEntityDecls(){
> > ->  space before opening {
> > 1322             if(entities.size()>  0){
> > ->  spaces after if, before {
> > 1344     protected List<NotationDeclaration>  getNotationDecls(){
> > ->  space before {
> > 1352                 if(notation!= null){
> > ->  spaces
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/XMLEntityStorage.jav
> a
> >   145     }
> >   146     /**
> > ->  insert blank line in between
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/DT
> DGrammar.java
> > 734     public List<XMLNotationDecl>  getNotationDecls(){
> > ->  blank before {
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/events/DTDEvent.jav
> a
> > 66     public void setEntities(List<EntityDeclaration>  entites){
> > ->  space before {; variable name entites ->  entities
> > 77     public void setNotations(List<NotationDeclaration>  notations){
> > ->  space
> > 94     protected final void init(){
> > ->  space
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/events/EndElementE
> vent.java
> > ->  order import statements alphabetically
> > 48     QName fQName ;
> > ->  space
> > 105     void addNamespace(Namespace ns){
> > ->  space
> > 106         if(ns != null){
> > ->  spaces
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/events/StartElement
> Event.java
> > ->  import statements order, a few space issues
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLEventWr
> iterImpl.java
> > 68     public void add(javax.xml.stream.XMLEventReader xMLEventReader)
> throws XMLStreamException {
> > 80     public void add(javax.xml.stream.events.XMLEvent xMLEvent) throws
> XMLStreamException {
> > ->  you should be able to use unqualified names for parameters
> >
> >
> src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStream
> WriterImpl.java
> >   906             ElementState elem;
> >   907
> >   908             while (!fElementStack.empty()) {
> >   909                 elem = fElementStack.pop();
> > ->  I think elem can be declared in line 909 as well, scope is only within
> while() block
> >
> > Best regards
> > Christoph
> >
> >
> >
> >> -----Original Message-----
> >> From: core-libs-dev [mailto:core-libs-dev-bounces at openjdk.java.net] On
> Behalf
> >> Of Joe Wang
> >> Sent: Montag, 12. Dezember 2016 20:14
> >> To: core-libs-dev at openjdk.java.net
> >> Subject: RFR (JAXP) 8170556: Warnings cleanup related to JDK-8167340
> >>
> >> Hi,
> >>
> >> This was the cleanup portion of the change for JDK-8167340. As Lance
> >> suggested, it was split from the original webrev. In addition to that
> >> cleanup, I've added coverage to the entire StAX packages. This cleanup
> >> will reduce 138 warnings.
> >>
> >> jbs: https://bugs.openjdk.java.net/browse/JDK-8170556
> >> webrev: http://cr.openjdk.java.net/~joehw/jdk9/8170556/webrev/
> >>
> >> Thanks,
> >> Joe


More information about the core-libs-dev mailing list