Skip to content

Commit ba4a485

Browse files
committed
hotfix: addons parsing of dependsOn and excludes
1 parent faf5f18 commit ba4a485

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>io.github.isa-group</groupId>
99
<artifactId>Pricing4Java</artifactId>
10-
<version>5.1.0</version>
10+
<version>5.1.1</version>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>
1313
<description>A pricing driven feature toggling library for java</description>

src/main/java/io/github/isagroup/services/parsing/AddOnParser.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ public static AddOn parseMapToAddOn(String addOnName, Map<String, Object> addOnM
3737
// ---------- availableFor ----------
3838
setAvailableFor(addOnMap, pricingManager, addOn);
3939

40-
// ---------- dependsOn ----------
41-
setDependsOn(addOnMap, pricingManager, addOn);
42-
43-
// ---------- excludes ----------
44-
setExcludes(addOnMap, pricingManager, addOn);
40+
// NOTE: dependsOn and excludes will be added later. This is because we need to have all the addOns parsed before we can check if the dependsOn and excludes are valid.
4541

4642
// ---------- private ----------
4743

src/test/resources/negative-parsing-tests.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TEST_DESCRIPTION;FILENAME;EXPECTED_ERROR_MESSAGE
22
# addOn.dependsOn
3-
Throw an error when refering to an add-on that does not exist in 'dependsOn';parsing/negative/addOn/dependsOn/unexistent-addOn.yml;The addOn bax is not defined in the pricing manager
3+
Throw an error when refering to an add-on that does not exist in 'dependsOn';parsing/negative/addOn/dependsOn/unexistent-addOn.yml;An error has occurred while parsing the add-on baz. Error: The addOn bax is not defined in the pricing manager
44
# addOn.private
55
Throw an error if add-on 'private' field is not a boolean;parsing/negative/addOn/private/boolean-string-private.yml;The field "private" should be a boolean
66
Throw an error if add-on 'private' field is not a boolean;parsing/negative/addOn/private/number-private.yml;The field "private" should be a boolean

0 commit comments

Comments
 (0)