Added a guard for versions without a dot; fixes gh-1115

This commit is contained in:
Marcin Grzejszczak
2019-07-08 15:48:21 +02:00
parent 03ce42294c
commit ba95b57f94

View File

@@ -382,7 +382,11 @@ class FileWalker extends SimpleFileVisitor<Path> {
private String withoutClassifier(DefaultArtifactVersionWrapper versionWrapper) {
String version = versionWrapper.version.toString();
return version.substring(0, version.lastIndexOf("."));
int lastIndexOf = version.lastIndexOf(".");
if (lastIndexOf != -1) {
return version.substring(0, lastIndexOf);
}
return version;
}
private File folderWithPredefinedName(File[] files) {