[ONOS-5232] Update generated code
Change-Id: I9c25d9f2888fbee78fddf10d02a3fa94f7ce46e0
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
index ed37a36..3c41605 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/YangJavaModelUtils.java
@@ -70,11 +70,9 @@
*
* @param info YANG java file info node
* @param config YANG plugin config
- * @throws IOException IO operations fails
*/
public static void updatePackageInfo(JavaCodeGeneratorInfo info,
- YangPluginConfig config)
- throws IOException {
+ YangPluginConfig config) {
JavaFileInfoTranslator translator = info.getJavaFileInfo();
@@ -95,11 +93,9 @@
*
* @param info YANG java file info node
* @param config YANG plugin config
- * @throws IOException IO operations fails
*/
private static void updatePackageForAugmentInfo(JavaCodeGeneratorInfo info,
- YangPluginConfig config)
- throws IOException {
+ YangPluginConfig config) {
JavaFileInfoTranslator translator = info.getJavaFileInfo();
@@ -236,11 +232,10 @@
/*
* Enumeration
*/
- translator.getEnumerationTempFiles()
+ translator.getEnumTempFiles()
.addEnumAttributeToTempFiles((YangNode) info, config);
- } else if (info instanceof YangChoice) {
- /*Do nothing, only the interface needs to be generated*/
- } else {
+ } else if (!(info instanceof YangChoice)) {
+ /*Do nothing, only the interface needs to be generated for choice*/
throw new TranslatorException(
getErrorMsgForCodeGenerator(INVALID_TRANSLATION_NODE,
info));
@@ -494,8 +489,8 @@
* @param rootNodeGen flag indicating check type
* @return true if check pass, false otherwise
*/
- public static boolean isNodeCodeGenRequired(YangNode node,
- boolean rootNodeGen) {
+ private static boolean isNodeCodeGenRequired(YangNode node,
+ boolean rootNodeGen) {
YangLeavesHolder holder = (YangLeavesHolder) node;
if (!holder.getListOfLeaf().isEmpty()) {