Skip to content

Commit

Permalink
fix inspections IDEA-197121 IDEA-CR-37180
Browse files Browse the repository at this point in the history
  • Loading branch information
nskvortsov committed Oct 1, 2018
1 parent 5633c90 commit 28cf505
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -275,18 +275,18 @@ mySession, createCollectRequest(groupId, artifactId, constraints, EnumSet.of(kin
* @param constraint - version or range constraint of original library
* @return resulting relaxed constraint to select annotations artifact.
*/
private Set<VersionConstraint> relaxForAnnotations(VersionConstraint constraint) {
private static Set<VersionConstraint> relaxForAnnotations(VersionConstraint constraint) {
String annotationsConstraint = constraint.toString();

final Version version = constraint.getVersion();
if (version != null) {
final String major = version.toString().split("\\.|-|_")[0];
final String major = version.toString().split("[.\\-_]")[0];
annotationsConstraint = "[" + major + ", " + version.toString() + "-an10000]";
}

final VersionRange range = constraint.getRange();
if (range != null) {
final String majorLower = range.getLowerBound().getVersion().toString().split("\\.|-|_")[0];
final String majorLower = range.getLowerBound().getVersion().toString().split("[.\\-_]")[0];

String upper = range.getUpperBound().isInclusive()
? range.getUpperBound().toString() + "-an10000]"
Expand Down

0 comments on commit 28cf505

Please sign in to comment.