package com.lazerycode.selenium;

import org.apache.maven.artifact.versioning.DefaultArtifactVersion;

import java.util.ArrayList;
import java.util.List;

public class VersionHandler {
    public VersionHandler() {

    }

    private List<DefaultArtifactVersion> versionContainer = new ArrayList<DefaultArtifactVersion>();

    DefaultArtifactVersion version = new DefaultArtifactVersion("1.11");
    DefaultArtifactVersion version2 = new DefaultArtifactVersion("1.11");

    public void addVersion(String version) {
        this.versionContainer.add(new DefaultArtifactVersion(version));
    }

    public String calculateHighestVersion() {
        DefaultArtifactVersion highestVersion = null;
        for (DefaultArtifactVersion version : this.versionContainer) {
            if (highestVersion == null || version.compareTo(highestVersion) > 0) {
                highestVersion = version;
            }
        }
        return highestVersion.toString();
    }

}

@@ -217,18 +217,16 @@
 er() %7B%0D%0A
-%0D%0A
     %7D%0D%0A%0D
@@ -334,159 +334,8 @@
 %0D%0A%0D%0A
-    DefaultArtifactVersion version = new DefaultArtifactVersion(%221.11%22);%0D%0A    DefaultArtifactVersion version2 = new DefaultArtifactVersion(%221.11%22);%0D%0A%0D%0A
     

Remove junk