Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.cyclonedx.model.Property;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
Expand Down Expand Up @@ -148,7 +150,7 @@ private List<Property> parsePropertyNode(JsonNode node, List<Property> propertie
}

private boolean isPreleaseDeserializationEnabled() {
final String s = System.getProperty("cyclonedx.prerelease.13.properties");
final String s = System.getProperty("cyclonedx.prerelease.14.properties");
return Boolean.parseBoolean(s);
}
}
19 changes: 10 additions & 9 deletions src/test/java/org/cyclonedx/parsers/XmlParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
*/
package org.cyclonedx.parsers;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.File;
import java.util.List;

import org.apache.commons.io.IOUtils;
import org.cyclonedx.CycloneDxSchema;
import org.cyclonedx.model.Bom;
Expand All @@ -30,14 +39,6 @@
import org.cyclonedx.model.Service;
import org.cyclonedx.model.ServiceData;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@SuppressWarnings("deprecation")
public class XmlParserTest {
Expand Down Expand Up @@ -439,7 +440,7 @@ public void test13PrereleasePropertyBom() throws Exception {
assertEquals("Foo", c1.getProperties().get(0).getName());
assertNull(c1.getProperties().get(0).getValue());

System.setProperty("cyclonedx.prerelease.13.properties", "true");
System.setProperty("cyclonedx.prerelease.14.properties", "true");
final Bom bom2 = parser.parse(file);
Component c2 = bom2.getComponents().get(0);
assertEquals(2, c2.getProperties().size());
Expand Down