Skip to content

Commit

Permalink
fix bug with stix registering of subtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenOTT committed May 4, 2019
1 parent ad770f4 commit d50ac2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.digitalstate.stix</groupId>
<artifactId>stix</artifactId>
<version>v0.8.4</version>
<version>v0.8.5</version>
<packaging>jar</packaging>

<name>STIX 2</name>
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/io/digitalstate/stix/json/StixParsers.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ public static ObjectMapper registerBundleMapperSubTypes(ObjectMapper objectMappe
WindowsServiceExtension.class};


jsonMapper.registerSubtypes(sdoClasses);
jsonMapper.registerSubtypes(sroClasses);
jsonMapper.registerSubtypes(dataMarkingClasses);
jsonMapper.registerSubtypes(bundleClasses);
jsonMapper.registerSubtypes(cyberObservableClasses);
jsonMapper.registerSubtypes(cyberObservableExtensionClasses);
jsonMapper.registerSubtypes(additionalNamedTypes);

return jsonMapper;
objectMapper.registerSubtypes(sdoClasses);
objectMapper.registerSubtypes(sroClasses);
objectMapper.registerSubtypes(dataMarkingClasses);
objectMapper.registerSubtypes(bundleClasses);
objectMapper.registerSubtypes(cyberObservableClasses);
objectMapper.registerSubtypes(cyberObservableExtensionClasses);
objectMapper.registerSubtypes(additionalNamedTypes);

return objectMapper;
}

public static BundleObject parseBundle(String bundleJsonString) throws IOException, StixParserValidationException {
Expand Down

0 comments on commit d50ac2f

Please sign in to comment.