All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.iris_events.asyncapi.runtime.util.VersionUtil Maven / Gradle / Ivy

There is a newer version: 6.1.8
Show newest version
package org.iris_events.asyncapi.runtime.util;

public class VersionUtil {
    public static String bumpVersion(String version, int spillOver) {
        String[] split = version.split("\\.");

        for (int i = split.length - 1; i >= 0; i--) {
            int n = Integer.parseInt(split[i]);
            if (n < spillOver) {
                split[i] = (n + 1) + "";
                break;
            } else {
                split[i] = 0 + "";
            }
        }
        return String.join(".", split);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy