caigy commented on code in PR #4991:
URL: https://github.com/apache/rocketmq/pull/4991#discussion_r962425619
##########
acl/src/test/java/org/apache/rocketmq/acl/plain/PlainPermissionManagerTest.java:
##########
@@ -215,16 +217,16 @@ public void isWatchStartTest() {
@Test
public void multiFilePathTest() {
- File file = new File("src/test/resources");
+ File file = new File("src/test/resources".replace("/",
File.separator));
System.setProperty("rocketmq.home.dir", file.getAbsolutePath());
PlainPermissionManager plainPermissionManager = new
PlainPermissionManager();
- String samefilePath = file.getAbsolutePath()+"/conf/acl/.";
- String samefilePath2 = "/" +file.getAbsolutePath()+"/conf/acl";
- String samefilePath3 =
file.getAbsolutePath()+"/conf/acl/../"+file.getAbsolutePath();
- String samefilePath4 = file.getAbsolutePath()+"/conf/acl///";
- String samefilePath5 = file.getAbsolutePath()+"/conf/acl/./";
+ String samefilePath =
file.getAbsolutePath()+"/conf/acl/.".replace("/", File.separator);
+ String samefilePath2 = file.getAbsolutePath()+"/conf/acl".replace("/",
File.separator);
Review Comment:
The purpose of `samefilePath2` is to assure '/folder' is equivalent to
'//folder' as path. IMO it should not be removed, but just check it in Linux or
OS with '/' as path separator.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]