Removed dependency upon net.kemitix:conditional to avoid circular dependency (#174)

This commit is contained in:
Paul Campbell 2019-03-04 19:31:39 +00:00 committed by GitHub
parent 744fa6e3cb
commit 6ab6b8ae17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View file

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* [5.3.5] - 2019-03-04
** Removed
- Removed dependency upon net.kemitix:conditional to avoid circular
dependency
* [5.3.4] - 2019-03-01 * [5.3.4] - 2019-03-01
** Dependencies ** Dependencies

View file

@ -31,7 +31,6 @@
<map-builder.version>1.0.0</map-builder.version> <map-builder.version>1.0.0</map-builder.version>
<mockito.version>2.24.5</mockito.version> <mockito.version>2.24.5</mockito.version>
<assertj.version>3.12.1</assertj.version> <assertj.version>3.12.1</assertj.version>
<conditional.version>0.7.0</conditional.version>
<classgraph.version>4.8.11</classgraph.version> <classgraph.version>4.8.11</classgraph.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version> <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
@ -60,11 +59,6 @@
<version>${lombok.version}</version> <version>${lombok.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>net.kemitix</groupId>
<artifactId>conditional</artifactId>
<version>${conditional.version}</version>
</dependency>
<dependency> <dependency>
<groupId>io.github.classgraph</groupId> <groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId> <artifactId>classgraph</artifactId>

View file

@ -24,7 +24,6 @@ package net.kemitix.checkstyle.ruleset.builder;
import com.speedment.common.mapstream.MapStream; import com.speedment.common.mapstream.MapStream;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import net.kemitix.conditional.Value;
import java.net.URI; import java.net.URI;
import java.util.Comparator; import java.util.Comparator;
@ -155,9 +154,11 @@ public class Rule {
final String ruleClassname, final String ruleClassname,
final Rule rule final Rule rule
) { ) {
return Value.<String>where(hasProperties(rule)) if (hasProperties(rule)) {
.then(() -> moduleWithParameters(rule, ruleClassname)) return moduleWithParameters(rule, ruleClassname);
.otherwise(() -> moduleNoParameters(ruleClassname)); } else {
return moduleNoParameters(ruleClassname);
}
} }
private static String moduleNoParameters( private static String moduleNoParameters(