private String getFilename()

in src/main/java/org/apache/maven/plugins/pmd/PmdViolationCheckMojo.java [141:156]


    private String getFilename(String fullpath, String pkg) {
        int index = fullpath.lastIndexOf(File.separatorChar);

        while (pkg != null && !pkg.isEmpty()) {
            index = fullpath.substring(0, index).lastIndexOf(File.separatorChar);

            int dot = pkg.indexOf('.');

            if (dot < 0) {
                break;
            }
            pkg = pkg.substring(dot + 1);
        }

        return fullpath.substring(index + 1);
    }