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 7 months ago

Hi,

Hi,

Are you using Java ME 1.7 or 1.3?

BR,

Mikko

Nadav Popplewell

6 years 7 months ago

Hi Mikko,

Hi Mikko,
I am using the 1.3 source

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194
  • Thu, 12/11/2025 - 11:01
    gurux.dlms.java 4.0.88

New forum topics

  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
  • Unable to connect L&T ER300P Meter
More

Who's new

  • brianmon
  • dejanm
  • Edward J TMA
  • zenagy
  • Bhanu Prakash
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin