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

6 years 10 months ago

Hi,

Hi,

Are you using Java ME 1.7 or 1.3?

BR,

Mikko

Nadav Popplewell

6 years 10 months ago

Hi Mikko,

Hi Mikko,
I am using the 1.3 source

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 04/14/2026 - 11:47
    gurux.dlms.java 4.0.93
  • Mon, 04/13/2026 - 16:12
    gurux.dlms.java 4.0.92
  • Mon, 04/13/2026 - 11:39
    Gurux.DLMS.Net 9.0.2604.1301
  • Tue, 04/07/2026 - 17:17
    Gurux.DLMS.Python 1.0.197
  • Tue, 04/07/2026 - 15:03
    gurux.dlms.c 9.0.2604.0701

New forum topics

  • Connecting To iskrameco ME382- Single Phase Meter with Optical Probe
  • Create custom AARQ Request for encrypted communication
  • Issue when reading Itron Type620 meter
  • Handling Unexpected Disconnects
  • DLMS Communication Issue – No Response (L&T Meter via USB Probe)
More

Who's new

  • JakubP
  • Strujomjer1
  • Mesotox
  • Tim_Kupreev
  • shanu_6167
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin