Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kapua-dev] Please have a look at issue #538

Having a closer look to this code I have to disagree.

I someone make a derived class and does not throw an exception, then the next case statement is reached.

So I would suggest to actually use "break" to stop processing each case.

On Tue, May 9, 2017 at 2:20 PM, Jens Reimann <jreimann@xxxxxxxxxx> wrote:
Checkstyle is complaining about it.

We could either add a break or the $FALL-THROUGH$ marker. The latter is already done. Both seem fine to me.

On Tue, May 9, 2017 at 2:11 PM, Abdelatif Bensari <abdelatif.bensari@xxxxxxxxx> wrote:
If the Eclipse IDE is compliant about it. Adding the break is an option, and this will satisfy everyone.
Otherwise leaving it as is, won't hurt.


On Tue, May 9, 2017 at 7:30 AM, Jens Reimann <jreimann@xxxxxxxxxx> wrote:
So we go with the fall-through marker then.

On Tue, May 9, 2017 at 12:54 PM, Abdelatif Bensari <abdelatif.bensari@xxxxxxxxx> wrote:
Hi,
This should not be a problem as long as the methods are throwing Exceptions.
The only thing is, if something happen (like an null pointer exception) before throwing the  target exception, we do not have that information for debugging. However the break won't change anything.
For me this piece of code make sense.
Have a nice day.




On Tue, May 9, 2017 at 5:33 AM, Jens Reimann <jreimann@xxxxxxxxxx> wrote:
Introducing checkstyle checks for case-fallthrough brought up an issue I covered in:

    https://github.com/eclipse/kapua/issues/538

I think it would be good if someone could have a look at it and either comment on it or fix it.

Cheers

Jens

--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill

_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev




--
Abdellatif Bensari

Ils bâtissent avec des pierres et ils ne voient pas que chacun de leurs gestes pour poser la pierre dans le mortier est accompagné d'une ombre de geste qui pose une ombre de pierre dans une ombre de mortier. Et c'est la bâtisse d'ombre qui compte.

_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev




--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill

_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev




--
Abdellatif Bensari

Ils bâtissent avec des pierres et ils ne voient pas que chacun de leurs gestes pour poser la pierre dans le mortier est accompagné d'une ombre de geste qui pose une ombre de pierre dans une ombre de mortier. Et c'est la bâtisse d'ombre qui compte.

_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev




--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill



--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill

Back to the top