Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
When value set via user properties, it is String not Integer
  • Loading branch information
cstamas committed Feb 16, 2024
1 parent 6f6a071 commit 5208820
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ class RemoteSnapshotMetadataGenerator implements MetadataGenerator {

RemoteSnapshotMetadataGenerator(RepositorySystemSession session, DeployRequest request) {
timestamp = (Date) ConfigUtils.getObject(session, new Date(), "maven.startTime");
buildNumber = (Integer) ConfigUtils.getObject(session, null, "maven.buildNumber");
Object bn = ConfigUtils.getObject(session, null, "maven.buildNumber");
if (bn instanceof Integer) {
this.buildNumber = (Integer) bn;
} else if (bn instanceof String) {
this.buildNumber = Integer.valueOf((String) bn);
} else {
this.buildNumber = null;
}

snapshots = new LinkedHashMap<>();

Expand Down

0 comments on commit 5208820

Please sign in to comment.