[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082309#comment-17082309
 ] 

Michael Osipov commented on IO-665:
---

Strongly support this!

[~ggregory]

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082364#comment-17082364
 ] 

Gary D. Gregory commented on IO-665:


I would welcome a PR with unit tests.

 

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082517#comment-17082517
 ] 

Otto Fowler commented on IO-665:


[~ggregory] can you add me as an io contributor, I'll do a pr

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082531#comment-17082531
 ] 

Otto Fowler commented on IO-665:


I think this should be an IllegalArgumentException though

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082543#comment-17082543
 ] 

Michael Osipov commented on IO-665:
---

[~otto], no. {{null}} must always lead to {{NPE}}. It is a common misconception 
to use {{IAE}} for trhat.

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082544#comment-17082544
 ] 

Otto Fowler commented on IO-665:


Fair enough.

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082559#comment-17082559
 ] 

Gary D. Gregory commented on IO-665:


Use the JRE's {{Obejcts.requireNonNull(foo, "foo")}} pattern.

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082560#comment-17082560
 ] 

Gary D. Gregory commented on IO-665:


[~otto] Anyone can create a PR on GitHub.

> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082561#comment-17082561
 ] 

Otto Fowler commented on IO-665:


I would like to assign the jira to myself


> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IO-665) XmlStreamReader throws IOException stream closed on null input stream

2020-04-13 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/IO-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082574#comment-17082574
 ] 

Otto Fowler commented on IO-665:


ok, PR up


> XmlStreamReader throws IOException stream closed on null input stream
> -
>
> Key: IO-665
> URL: https://issues.apache.org/jira/browse/IO-665
> Project: Commons IO
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Had to go into the debugger because when some code passed null into the 
> org.apache.commons.io.input.XmlStreamReader constructor it threw an 
> IOException with the message "Stream closed". 
>  
> This is not accurate. There was no stream. It was null. If a 
> NullPointerException had been thrown instead, this would have been easier to 
> debug.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)