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

Joe Wang huizhe.wang at oracle.com
Wed Dec 14 00:42:00 UTC 2016


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/XMLStreamReaderImpl.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.java
>   145     }
>   146     /**
> ->  insert blank line in between
>
> src/java.xml/share/classes/com/sun/xml/internal/stream/dtd/nonvalidating/DTDGrammar.java
> 734     public List<XMLNotationDecl>  getNotationDecls(){
> ->  blank before {
>
> src/java.xml/share/classes/com/sun/xml/internal/stream/events/DTDEvent.java
> 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/EndElementEvent.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/StartElementEvent.java
> ->  import statements order, a few space issues
>
> src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLEventWriterImpl.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/XMLStreamWriterImpl.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