You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2024/01/08 13:44:41 UTC
Re: [PR] Support URLencoding during normalization [commons-vfs]
garydgregory commented on code in PR #396:
URL: https://github.com/apache/commons-vfs/pull/396#discussion_r1444662946
##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/UriParser.java:
##########
@@ -455,6 +455,156 @@ public static boolean fixSeparators(final StringBuilder name) {
return changed;
}
+ private static class PathNormalizer {
+ private final StringBuilder path;
+ private int cursor = 0;
Review Comment:
Don't initialize an instance variable to its default value.
##########
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/UriParser.java:
##########
@@ -455,6 +455,156 @@ public static boolean fixSeparators(final StringBuilder name) {
return changed;
}
+ private static class PathNormalizer {
+ private final StringBuilder path;
+ private int cursor = 0;
+ private int lastSeparator;
+ private int end;
+ PathNormalizer(StringBuilder path) {
Review Comment:
Use final where you can.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org