Remove CSS code JIRA: TSC-111 Change-Id: Ib74c1d3dfc029c2472b8834ae55ce05c8231d225 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
String performance and maintenability Use StringBuilder for strings built in loops. Use plain concatenation for string construction not involving loops. Change-Id: I8299eb54a347d132f0d19dfb39c8fb52366049f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Replace LOGGER by LOG Replace LOGGER by LOG to follow the OpenDaylight recommendations [1]. [1] https://wiki.opendaylight.org/view/BestPractices/Logging_Best_Practices Change-Id: I024bcd5f23a5bdcc177440b175578694c6c471a4 Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
yang-jmx-generator-plugin: use lambdas This series of patches uses lambdas instead of anonymous classes for functional interfaces when possible. Lambdas are replaced with method references when appropriate. Change-Id: Ic44563e54557fb678c23c7bd79121419303ef153 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Use the diamond operator in generated Java Now that javaparser is used to verify the generated code, use <>. Change-Id: I9ef5ad62108b91eba8565329386f96c777b03cdf Signed-off-by: Stephen Kitt <skitt@redhat.com>
Gen. Abstract*ModuleFactory with WORKING handleChangedClass() Bug: 2855 Change-Id: I243da5822265db3913f6b0afb2f9393f78b0c24c Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Gen. Abstract*ModuleFactory handleChangedClass() with DependencyResolver Bug: 2855 Change-Id: Ieb010d67983a4807bd1e5b55886ba0c4c3f13385 Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Yang code generator cleanup Two axes: * make the generated code slightly better * make the generator code slightly better Fixes in generator code: * fields which can be local variables * map overwrite detection using put()'s return value * logging with exceptions * using File's parent/child handling instead of concatenating strings * if (condition) { return true; } else { return false; } simplification * if (... == false) -> if (!...) * interface method declarations are public by default * Collections.singletonList() instead of Arrays.asList() for single-item collections * StringBuilder instead of StringBuffer * String concatenation instead of straight-forward StringBuilder (i.e. non-conditional append() calls) * typos: hierarchchical -> hierarchical, intends -> indents * drop unused parameter from AbstractAttributesProcessor::processAttributes() * when processing only values in a map, use .values() rather than .entrySet() * split StringBuilder::append(a + b) into two ::append() calls * clean up the method parameter construction in MethodSerializer (to avoid deleting the ", " at the end) Fixes in generated code: * use { } as requested the Checkstyle rules * handle empty service interface sets explicitly It would be nice to use the <> operator without specifying the type where possible, but the Eclipse AST parser used in the unit tests is too old for this (so the generated code is correct and works elsewhere, but fails the unit tests). Change-Id: I725ce8d98f9ee389d394772733663ecacaccf8fa Signed-off-by: Stephen Kitt <skitt@redhat.com>
Fix license header violations in yang-jmx-generator-plugin Change-Id: Iac866a580e9d07e9f2614a7c5c25e91e755cb4ba Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
BUG-2283 Fix close order when reconfiguring config modules. Close is called from top(dependency source) to bottom(dependency target) while createInstance is called in opposite direction. This commit changes API and SPI of config subsystem and thus breaks runtime compatibility. Change-Id: I5b03f0673c5ecb95efbfccad7fa6ed7a490ff61b Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Fix checkstyle warnings in yang-jmx-generator-plugin Change-Id: I2c1d564b8ddbc04beaa0f2a1914fb6c64bfc2dfb Signed-off-by: Marian Dubai <mdubai@cisco.com>
Fix checkstyle warnings in opendaylight/config Change-Id: Ie82918d2888b6271850e371340b46825079ad485 Signed-off-by: Robert Varga <rovarga@cisco.com>
Make dependencyResolver protected in generated code Make Abstract*Module's dependencyResolver protected instead of private, so that methods like getAttribute can be used from concrete Modules. Change-Id: Ic02dbb59f9a9fca8138762ff476f2a5e489eb58a Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Bug:1252 - Fix formatting errors in config code generator Fix intendation and double semicolons in yang-jmx-generator-plugin. Change-Id: I77ad31eaa62a41d0149f57754f5ec727e07ad292 Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
BUG-1166: do not import BundleContext As it turns out, the entire import is only needed to get the canonical class name. Replace the import with a static string, leaving the dependency behind. Change-Id: Ia300738b2d2351404eae1b2da20a0c6bc41ecd22 Signed-off-by: Robert Varga <rovarga@cisco.com>
Add serialVersionUID to Serializable Serializable classes have to have serialVersionUID. Add it where it's missing. Change-Id: I23689005878280b6ee9f97fb12ae0b15151f20d7 Signed-off-by: Robert Varga <rovarga@cisco.com>
Resolve Bug:853 - remove groovy from config code generator. Replace 3 groovy classes with java equivalents. Change-Id: I625f0498c3ccaedf0441c637ac61a9653c98e579 Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
Resolve Bug:445 Remove freemarker from config code generator. Change-Id: Idf834620cb7e12e10e7fca1ce8ea0172ca730a3d Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>