mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
This commit is contained in:
parent
9c98d6470d
commit
7a8635eba2
4 changed files with 77 additions and 17 deletions
|
|
@ -21,8 +21,8 @@ package de.kosit.validationtool.impl.tasks;
|
|||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
|
|
@ -113,11 +113,7 @@ public interface CheckAction {
|
|||
*/
|
||||
public String getName() {
|
||||
final String fileName = getInput().getName().replaceAll(".*/|.*\\\\", "");
|
||||
final Matcher matcher = Pattern.compile("(.*)\\..+").matcher(fileName);
|
||||
if (matcher.matches()) {
|
||||
return matcher.group(1);
|
||||
}
|
||||
return fileName;
|
||||
return FilenameUtils.getBaseName(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue