Skip to content

Commit 52fb1d2

Browse files
committed
[FIXED] fixed NVersion.get
1 parent bd11d5c commit 52fb1d2

40 files changed

+97
-98
lines changed

core/nuts-api/src/main/java/net/thevpc/nuts/artifact/NId.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static NOptional<NId> get(String groupId, String artifactId, NVersion version) {
7070
}
7171

7272
static NOptional<NId> get(String groupId, String artifactId, String version) {
73-
return NVersion.getPartAt(version).map(x -> new DefaultNId(groupId, artifactId, x));
73+
return NVersion.get(version).map(x -> new DefaultNId(groupId, artifactId, x));
7474
}
7575

7676
static NOptional<NId> getApi(NVersion version) {

core/nuts-api/src/main/java/net/thevpc/nuts/artifact/NVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public interface NVersion extends Serializable, Comparable<NVersion>, NBlankable
5858
* @param version string value
5959
* @return parsed value
6060
*/
61-
static NOptional<NVersion> getPartAt(String version) {
61+
static NOptional<NVersion> get(String version) {
6262
if (NBlankable.isBlank(version)) {
6363
return NOptional.of(BLANK);
6464
}
@@ -70,7 +70,7 @@ static NOptional<NVersion> getPartAt(String version) {
7070
}
7171

7272
static NVersion of(String version) {
73-
return getPartAt(version).get();
73+
return get(version).get();
7474
}
7575

7676
/**

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/DefaultNBootOptionsBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,7 @@ public NBootOptionsBuilder setTheme(String theme) {
25252525
}
25262526

25272527
public NBootOptionsBuilder copyFrom(NBootOptionsInfo other) {
2528-
this.setApiVersion(other.getApiVersion() == null ? null : NVersion.getPartAt(other.getApiVersion()).orNull());
2528+
this.setApiVersion(other.getApiVersion() == null ? null : NVersion.get(other.getApiVersion()).orNull());
25292529
this.setRuntimeId(other.getRuntimeId() == null ? null :
25302530
other.getRuntimeId().contains("#") ? NId.get(other.getRuntimeId()).orNull() :
25312531
NId.getRuntime(other.getRuntimeId()).orNull()

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/DefaultNDependencyBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public NDependencyBuilder setVersion(NVersion version) {
309309

310310
@Override
311311
public NDependencyBuilder setVersion(String version) {
312-
this.version = NVersion.getPartAt(version).get();
312+
this.version = NVersion.get(version).get();
313313
return this;
314314
}
315315

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/DefaultNIdBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public NIdBuilder setVersion(NVersion value) {
131131

132132
@Override
133133
public NIdBuilder setVersion(String value) {
134-
this.version = NVersion.getPartAt(value).get();
134+
this.version = NVersion.get(value).get();
135135
return this;
136136
}
137137

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/DefaultNWorkspaceOptionsBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ public NBootOptionsInfo toBootOptionsInfo() {
17421742
}
17431743

17441744
public NWorkspaceOptionsBuilder copyFrom(NBootOptionsInfo other) {
1745-
this.setApiVersion(other.getApiVersion() == null ? null : NVersion.getPartAt(other.getApiVersion()).orNull());
1745+
this.setApiVersion(other.getApiVersion() == null ? null : NVersion.get(other.getApiVersion()).orNull());
17461746
this.setRuntimeId(other.getRuntimeId() == null ? null :
17471747
other.getRuntimeId().contains("#") ? NId.get(other.getRuntimeId()).orNull() :
17481748
NId.getRuntime(other.getRuntimeId()).orNull()

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/app/NAppImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void prepare(NAppInitInfo appInitInfo) {
247247
case "update": {
248248
this.mode = NApplicationMode.UPDATE;
249249
if (execModeCommand.hasNext()) {
250-
this.previousVersion = NVersion.getPartAt(execModeCommand.next().get().image()).get();
250+
this.previousVersion = NVersion.get(execModeCommand.next().get().image()).get();
251251
}
252252
this.modeArgs = execModeCommand.toStringList();
253253
execModeCommand.skipAll();

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/descriptor/util/NDescriptorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static NDescriptor checkDescriptor(NDescriptor nutsDescriptor) {
7979
.setDefaultValue(ov)
8080
.setHintMessage(NBlankable.isBlank(ov) ? null : NMsg.ofPlain(ov))
8181
.getValue();
82-
version = NVersion.getPartAt(v).get();
82+
version = NVersion.get(v).get();
8383
}
8484
break;
8585
}

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/elem/mapper/NElementMapperNVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public NElement createElement(NVersion o, Type typeOfSrc, NElementFactoryContext
3030

3131
@Override
3232
public NVersion createObject(NElement o, Type typeOfResult, NElementFactoryContext context) {
33-
return NVersion.getPartAt(o.asStringValue().get()).get();
33+
return NVersion.get(o.asStringValue().get()).get();
3434
}
3535

3636
}

core/nuts-runtime/src/main/java/net/thevpc/nuts/runtime/standalone/executor/java/JavaExecutorComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public IProcessExecHelper execHelper(NExecutionContext executionContext) {
228228
Matcher mm = pp.matcher(s);
229229
if (mm.find()) {
230230
String v = mm.group("v");
231-
nutsDependencyVersion = NVersion.getPartAt(v).get();
231+
nutsDependencyVersion = NVersion.get(v).get();
232232
break;
233233
}
234234
}

0 commit comments

Comments
 (0)