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

Hi,

Hi,

Are you using Java ME 1.7 or 1.3?

BR,

Mikko

Nadav Popplewell

6 years 8 months ago

Hi Mikko,

Hi Mikko,
I am using the 1.3 source

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Sun, 02/01/2026 - 19:47
    gurux.dlms.cpp 9.0.2602.0101
  • Tue, 01/20/2026 - 10:38
    gurux.dlms.java 4.0.89
  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87

New forum topics

  • Issue with KWH Value Reading Using Gurux DLMS Library.
  • CEWE Prometer 100
  • Kaifa Meter Communication via Android Application
  • OnePassDiffieHellman Key Agreement Not Working in GXDLMSDirector GUI
  • Parse compact frame CF49
More

Who's new

  • AsadAF
  • 1983sedat
  • Ebrahim
  • dur00995
  • Catalin
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin