SneakyThrows and code coverage

366 views
Skip to first unread message

mirabilos

unread,
Jun 25, 2020, 5:35:54 AM6/25/20
to Project Lombok
Hi,

I’m wondering if there’s a way to ignore @SneakyThrows for code coverage tools.
Both IntelliJ and Sonar/JaCoCo show it as one uncovered line, more precisely
the one with the annotation.

I introduced SneakyThrows because I had three uncovered lines, because of a
checked exception that cannot ever be thrown… this kinda defeats the purpose.

Thanks in advance,
//mirabilos

apoos

unread,
Jan 7, 2021, 5:59:12 PM1/7/21
to Project Lombok
Did you find a solution to it?

Thorsten Glaser

unread,
Jan 8, 2021, 7:26:37 AM1/8/21
to Project Lombok
On Tue, 5 Jan 2021, apoos wrote:

> On Thursday, 25 June 2020 04:35:54 UTC-5, mirabilos wrote:

> > I’m wondering if there’s a way to ignore @SneakyThrows for code
> > coverage tools. Both IntelliJ and Sonar/JaCoCo show it as one
> > uncovered line, more precisely the one with the annotation.
> >
> > I introduced SneakyThrows because I had three uncovered lines,
> > because of a checked exception that cannot ever be thrown… this
> > kinda defeats the purpose.

> Did you find a solution to it?

Unfortunately not; you are the first TTBOMK to even respond to this.

bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

*************************************************

Mit unserem Consulting bieten wir Unternehmen maßgeschneiderte Angebote in
Form von Beratung, Trainings sowie Workshops in den Bereichen
Softwaretechnologie, IT Strategie und Architektur, Innovation und Umsetzung
sowie Agile Organisation.

Besuchen Sie uns auf https://www.tarent.de/consulting .
Wir freuen uns auf Ihren Kontakt.

*************************************************
Reply all
Reply to author
Forward
0 new messages