Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update server4j to v5.3.0 #1388

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
</dependency>

<dependency>
<groupId>com.vdurmont</groupId>
<groupId>org.semver4j</groupId>
<artifactId>semver4j</artifactId>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
requires com.google.gson;
requires org.apache.commons.io;
requires org.apache.commons.lang3;
requires semver4j;
requires org.semver4j;

exports org.mule.runtime.api.app.declaration.serialization;
exports org.mule.runtime.api.artifact;
Expand Down
13 changes: 3 additions & 10 deletions src/main/java/org/mule/runtime/api/meta/MuleVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
package org.mule.runtime.api.meta;

import com.google.common.base.Joiner;
import com.vdurmont.semver4j.Semver;
import com.vdurmont.semver4j.SemverException;

import static com.vdurmont.semver4j.Semver.SemverType.LOOSE;
import org.semver4j.Semver;

/**
* This class represents Mule Software version scheme: {major}.{minor}.{revision}-{suffix}
Expand All @@ -36,12 +34,7 @@ public String toString() {
}

private void parse(String version) {
try {
this.semver = new Semver(version, LOOSE);
if (this.semver.getMajor() == null || this.semver.getMinor() == null) {
throw new IllegalArgumentException("Invalid version " + version);
}
} catch (SemverException sve) {
if (!Semver.isValid(version)) {
throw new IllegalArgumentException("Invalid version " + version);
}
}
Expand Down Expand Up @@ -131,7 +124,7 @@ public boolean newerThan(MuleVersion version) {
*/
public String toCompleteNumericVersion() {
return this.semver.getMajor() + "." + semver.getMinor() + "."
+ (this.semver.getPatch() != null ? this.semver.getPatch() : 0);
+ this.semver.getPatch();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
requires com.google.gson;
requires org.apache.commons.io;
requires org.apache.commons.lang3;
requires semver4j;
requires org.semver4j;
requires transitive junit;
requires org.hamcrest;
requires io.qameta.allure.commons;
Expand Down