Hi,

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.        

Thanks,
Justin




Reply via email to