Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Possible Bugs In Code?

Possible bugs in code?

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Nadav Popplewell, 30 May, 2019
Forums
Gurux DLMS for ME

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;

Profile picture for user Kurumi

Kurumi

5 years 11 months ago

Hi,

Hi,

Are you using Java ME 1.7 or 1.3?

BR,

Mikko

Nadav Popplewell

5 years 11 months ago

Hi Mikko,

Hi Mikko,
I am using the 1.3 source

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401
  • Tue, 05/13/2025 - 10:00
    Gurux.DLMS.Android 2.0.15
  • Fri, 05/09/2025 - 13:03
    Gurux.DLMS.Python 1.0.181
  • Wed, 05/07/2025 - 16:09
    Gurux.DLMS.Android 2.0.14

New forum topics

  • Long reading ends with "Invalid frame ..." error.
  • Push listener example how it works + tcp stream issue
  • Problem with reading energymeter Star DTS27 via GXDLMSDirector
  • Receiver Ready Test Failed
  • Combining several meters' profile generic data into one
More

Who's new

  • ved224456
  • jai224456
  • neli001
  • Papapajikotryrt
  • MAJNU2
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin