BUG-582: optimize replaceWithCamelCase 15/7815/3
authorRobert Varga <rovarga@cisco.com>
Sun, 8 Jun 2014 10:23:13 +0000 (12:23 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 18 Jun 2014 09:43:47 +0000 (11:43 +0200)
commita755b97c24bc01c7d0a2c8b02a90af7eb5ceb17e
tree1fe026085e116afa57e958b8a51fe8ae5e6624f4
parent6c0e186c4cbb709b71ce2816a2b308781d860eaa
BUG-582: optimize replaceWithCamelCase

Optimize replaceWithCamelCase() by not instantiating a string just to do
a toUppserCase.

Also the initial character lookup is done on the original string, such
that we can elide any object instantiation if the character to be
removed is not found.

Change-Id: Iee81f1967d47a63668bf14b319a2f46715e6866b
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-generator-util/src/main/java/org/opendaylight/yangtools/binding/generator/util/BindingGeneratorUtil.java