• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

skuzzle / restrict-imports-enforcer-rule / 82

pending completion
82

push

jenkins

skuzzle
Update maven-wrapper to 3.9.2

1124 of 1244 relevant lines covered (90.35%)

1.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/main/java/de/skuzzle/enforcer/restrictimports/parser/lang/FileExtension.java
1
package de.skuzzle.enforcer.restrictimports.parser.lang;
2

3
import java.io.File;
4
import java.nio.file.Path;
5

6
final class FileExtension {
7

8
    static String fromFilename(String fullName) {
9
        final String fileName = new File(fullName).getName();
2✔
10
        final int dotIndex = fileName.lastIndexOf('.');
2✔
11
        return (dotIndex == -1) ? "" : fileName.substring(dotIndex + 1);
2✔
12
    }
13

14
    static String fromPath(Path path) {
15
        return fromFilename(path.getFileName().toString());
2✔
16
    }
17

18
    private FileExtension() {
×
19
        throw new IllegalStateException("hidden");
×
20
    }
21
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc