IIUYC your point is to see thrown IOException after close().
No problem to accomplish this. There are 98 occurrences of such calls
altogether, but the context of the code must guarantee that the plugin
would not hang and it would fail gracefully on internal issue.
WDYT?

On Sun, Jan 8, 2017 at 3:28 AM, Tibor Digana <[email protected]> wrote:

> As an example flush() is missing in RunEntryStatisticsMap.java L130.
> Maybe I would find more but this is not the only case. There are 24 files
> changed.
>
> On Sun, Jan 8, 2017 at 3:19 AM, Tibor Digana-2 [via Maven] <
> [email protected]> wrote:
>
> > Currently I have two clone o master. The HEAD and 4d36 and I see the
> > difference on the file system.
> >
> > I think this is wrong:
> > reader.close()
> > reader = null;
> > finally {
> > IOUtils.close(reader);
> > }
> > I know that IOUtils swallows exception on close().
> > I agree that better would be
> >
> > method () throws IOException
> > <read>
> > }
> > finally
> > {
> > reader.close();
> > }
> > Most probably read/write operation would fail on before closing the
> > stream,
> > but I would rather not to use IOUtil.close() since it swallows the
> > exception.
> >
> > In case of PrintWriter it was just more simple to use it because of not
> > needed additional three objects:
> > FileOutputStream
> > OutputStreamWriter
> > BufferedWriter
> >
> > I still do not understand why Oracle does not have IOException in method
> > signatures of PrintWriter but hopefully they introduced checkError().
> > For user it does not matter if the exception was originated from write()
> > or
> > synthetic one. The important is that the plugin fails on fatal error
> > without hanging and with meaningful message.
> > I think we can do both:
> > + compact code
> > + IOException as well
> > We can add our utility class which closes PrintWriter, calls checkError()
> > and throws IOException. WDYT?
> >
> >
> >
> >
> >
> >
> >
> > On Sun, Jan 8, 2017 at 2:43 AM, Christian Schulte <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5891886&i=0>> wrote:
> >
> > > Am 01/08/17 um 01:27 schrieb Tibor Digana:
> > > > You committed right after me and you have reverted two Jira issue.
> > >
> > > This would not have been possible. What reverts are you talking about.
> I
> > > am locking at
> > > <https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git>.
> > >
> > > > I do not want to continue until we make agreement.
> > > > If you want to see thrown IOException, then we can use
> > > InputStream.close()
> > > > instead of IOUtils.close().
> > > > Please nobody commit until we know what we clarify.
> > >
> > > Have you read the Javadoc of the 'closeQuietly' methods as I suggested?
> > > <http://commons.apache.org/proper/commons-io/javadocs/
> > > api-release/org/apache/commons/io/IOUtils.html>
> > >
> > > Looking at the commits, I get the impression, you haven't got the point
> > > in closing resources on failure and again added things suppressing
> > > exceptions not to ignore.
> > >
> > > > Except for PrintWriter there is again all old staff back like missed
> > > > flush(), etc.
> > >
> > > There are no missing flush calls. Where?
> > >
> > > > Btw. PrintWriter has a method which could be called and throw
> > exception
> > > > from our code
> > >
> > > Why use the PrintWriter class in some private method if you must add
> > > special exception handling to it when you could just use a writer with
> > > standard exception handling? That's been my intention. I am still
> > > running the ITs locally. Will take a look if things don't succeed.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5891886&i=1>
> > > For additional commands, e-mail: [hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5891886&i=2>
> > >
> > >
> >
> >
> > --
> > Cheers
> > Tibor
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://maven.40175.n5.nabble.com/Lets-talk-about-our-
> > changes-openly-maven-surefire-git-commit-SUREFIRE-1324-
> > Surefire-incorrectly-supp-tp5891058p5891886.html
> > To start a new topic under Maven Developers, email
> > [email protected]
> > To unsubscribe from Maven Developers, click here
> > <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?
> macro=unsubscribe_by_code&node=142166&code=dGlib3JkaWdhbmFAYXBhY2hlLm9yZ3
> wxNDIxNjZ8LTI4OTQ5MjEwMg==>
> > .
> > NAML
> > <http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?
> macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&
> base=nabble.naml.namespaces.BasicNamespace-nabble.view.
> web.template.NabbleNamespace-nabble.view.web.template.
> NodeNamespace&breadcrumbs=notify_subscribers%21nabble%
> 3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_
> instant_email%21nabble%3Aemail.naml>
> >
>
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.
> com/Lets-talk-about-our-changes-openly-maven-surefire-
> git-commit-SUREFIRE-1324-Surefire-incorrectly-supp-tp5891058p5891890.html
> Sent from the Maven Developers mailing list archive at Nabble.com.
>

Reply via email to