Ok ... fixed that __

Thanks again for finding (


Am 17.02.18, 09:43 schrieb "Christofer Dutz" <christofer.d...@c-ware.de>:

    If it's code I have written, it was a mistake ... I would agree to use the 
exception and not the assertion, because they can be turned off.
    Outlook for Android<https://aka.ms/ghei36> herunterladen
    From: Justin Mclean <jus...@classsoftware.com>
    Sent: Saturday, February 17, 2018 8:14:24 AM
    To: dev@plc4x.apache.org
    Subject: Does this seem odd to you?
    It's a very minor thing I know but I just came access this:
    public static TpduSize valueForGivenSize(int pduSize) {
            if(pduSize < 0) {
                throw new IllegalArgumentException("PduSize has to be greater 
than 0");
            assert pduSize > 0;
    And have a few questions:
    - Should we be using asserts in code like that?
    - Wouldn't it be easier to just change the first condition to match the 
message i.e. <= rather than < and drop the assert?
    Just asking cos there may be a something I missing here. It’s in 
java/isotp/netty/model/types/TpduSize.java BTW.

Reply via email to