Fixes sonar warnings and improves performance just bit.
Change-Id: I5b8ce70077af7ba5e13a74e9bdd00aca8822dcc2
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
final Parser parser = (Parser) recognizer;
try {
String model = parser.getInputStream().getTokenSource().getInputStream().toString();
- model = model.substring(0, model.indexOf("\n"));
+ model = model.substring(0, model.indexOf('\n'));
model = model.substring(model.indexOf("module") + 6);
- model = model.substring(0, model.indexOf("{"));
+ model = model.substring(0, model.indexOf('{'));
model = model.trim();
return model;
} catch (Exception e) {