Skip to content

Commit dd78cb9

Browse files
Add underscore to the beginning of enum values if they start with a number
1 parent ef71ec5 commit dd78cb9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,13 @@ private Map<String, RPC> getRPCsMap(String fileName, boolean includeMandatoryPar
411411
skipElement = false;
412412
String elementName = myParser.getAttributeValue(null, "name");
413413

414+
// -------------- Exceptional cases because of mismatch between the RPC spec and the Android code --------------
415+
// Add "_" to the beginning if the names starts with a digit
416+
if (Character.isDigit(elementName.charAt(0))) {
417+
elementName = "_" + elementName;
418+
}
419+
// -------------------------------------------------------------------------------------------------------------
420+
414421
Element element = new Element()
415422
.setRPCName(rpcName)
416423
.setName(elementName)

0 commit comments

Comments
 (0)