I downloaded the Gurux DLMS for ME code and the compiler reported several places where there SEEMS to be missing breaks in switch statements (see at the bottom of the message)
The first 2 are not a problems because the methods throw exceptions,
but the other 3 seems to me to be bugs....
Can somebody please confirm this?
Thanks,
Nadav
Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above GXDLMS.java /DLMS/src/gurux/dlms line 2317
Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above GXDLMS.java /DLMS/src/gurux/dlms line 2319
case Command.CONFIRMED_SERVICE_ERROR:
handleConfirmedServiceError(data);
case Command.EXCEPTION_RESPONSE:
handleExceptionResponse(data);
case Command.GET_REQUEST:
case Command.READ_REQUEST:
Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above GXDLMS.java /DLMS/src/gurux/dlms line 2665
case 26:// ObjectType.UTILITY_TABLES:
value[0] = 0;
count[0] = 0;
case 18:// ObjectType.IMAGE_TRANSFER:
value[0] = 0x40;
count[0] = 4;
break;
Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above GXDLMSSNCommandHandler.java /DLMS/src/gurux/dlms line 523
case VariableAccessSpecification.WRITE_DATA_BLOCK_ACCESS:
handleReadDataBlockAccess(settings, server,
Command.WRITE_RESPONSE, data, cnt, replyData, xml);
if (xml == null) {
return;
}
default:
// Device reports a HW error.
results.setUInt8(ErrorCode.HARDWARE_FAULT.getValue());
}
Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above GXDLMSSecuritySetup.java /DLMS/src/gurux/dlms/objects line 550
case 1:// GlobalKeyType.BROADCAST_ENCRYPTION:
// Invalid type
e.setError(ErrorCode.READ_WRITE_DENIED);
case 2:// GlobalKeyType.AUTHENTICATION:
// if settings.Cipher is null non secure server is used.
settings.getCipher().setAuthenticationKey(GXDLMSSecureClient
.decrypt(settings.getKek(), data));
break;
Hi,
Hi,
Are you using Java ME 1.7 or 1.3?
BR,
Mikko
Hi Mikko,
Hi Mikko,
I am using the 1.3 source