Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include的逻辑有问题!!!!!!! #24

Open
wuguonan1986 opened this issue Sep 8, 2017 · 1 comment
Open

include的逻辑有问题!!!!!!! #24

wuguonan1986 opened this issue Sep 8, 2017 · 1 comment

Comments

@wuguonan1986
Copy link

No description provided.

@wuguonan1986
Copy link
Author

wuguonan1986 commented Sep 8, 2017

public static boolean isIncluded(String path, Collection<String> includePackage) {
    if (Os.isFamily(Os.FAMILY_WINDOWS)) {
        path = path.replaceAll("\\\\", "/");
    }

    if (includePackage.size() == 0) {
        return true
    }

    for (String include : includePackage) {
        if (path.startsWith(include)) {
            return true;
        }
    }

    return false;
}

以上逻辑path传进来的是绝对路径,不是包名路径,startsWith是不会返回true的

@wuguonan1986 wuguonan1986 changed the title includ include的逻辑有问题!!!!!!! Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant