Skip to content

Commit

Permalink
Merge pull request #2 from erssebaggala/fix_bug_in_2.0.1
Browse files Browse the repository at this point in the history
Fix missing parameter values in 2.0.0
  • Loading branch information
erssebaggala committed Oct 28, 2019
2 parents 9eaaf4d + 6e8e3c0 commit e06bc4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.bodastage.boda_huaweicmmotreeparser</groupId>
<artifactId>boda-huaweicmmotreeparser</artifactId>
<packaging>jar</packaging>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1</version>
<name>boda-huaweicmmotreeparser</name>
<url>http://maven.apache.org</url>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class HuaweiCMMOTreeParser {
*
* Since 1.3.0
*/
final static String VERSION = "2.0.0";
final static String VERSION = "2.0.1";

/**
* Tracks Managed Object attributes to write to file. This is dictated by
Expand Down Expand Up @@ -419,6 +419,7 @@ public void endELementEvent(XMLEvent xmlEvent)
if( classDepth == 1 && moAttrName.equals("name")){
this.nodeName = tagData;
}

tagData = "";
return;
}
Expand All @@ -431,8 +432,10 @@ public void endELementEvent(XMLEvent xmlEvent)
if(!moColumns.containsKey(className)){
moColumns.put(className,new Stack());
}

columns = moColumns.get(className);

moiParameterValueMap = classNameAttrsMap.get(className);

Iterator<Map.Entry<String, String>> iter
= moiParameterValueMap.entrySet().iterator();
while (iter.hasNext()) {
Expand All @@ -441,11 +444,14 @@ public void endELementEvent(XMLEvent xmlEvent)
columns.push(me.getKey());
}
}

moColumns.put(className, columns);

}

if( parserState == ParserStates.EXTRACTING_VALUES){
String paramNames = "FILENAME,NODENAME";
String paramValues = baseFileName+","+toCSVFormat(this.nodeName);
String paramValues = baseFileName + "," + toCSVFormat(this.nodeName);

//If MO is not in parameterFile, continue
if(!moColumns.containsKey(className) && parameterFile != null){
Expand Down Expand Up @@ -576,7 +582,7 @@ public void parse() throws XMLStreamException, FileNotFoundException, Unsupporte

parserState = ParserStates.EXTRACTING_VALUES;
}

//Reset variables
resetVariables();

Expand Down

0 comments on commit e06bc4d

Please sign in to comment.