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

false positive in OrphanedFormatString check for non-traditional URL schemes #4609

Open
erm-g opened this issue Oct 8, 2024 · 0 comments
Open

Comments

@erm-g
Copy link

erm-g commented Oct 8, 2024

What version of Error Prone are you using?
Latest - 2.33.0

Does this issue reproduce with the latest release?
Yes

What did you do?

public static void main(String[] args) {
    StringBuilder url = new StringBuilder("https://mydomain%21com/");
    url.append("path");
    System.out.println(url);
    url = new StringBuilder("spiffe://mydomain%21com/");
    url.append("path");
    System.out.println(url);
}

What did you expect to see?
No warning

What did you see instead?
[9,29] [OrphanedFormatString] String literal contains format specifiers, but is not passed to a format method
[9,29] indicates "spiffe://" case, not the "https://" one

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