https://bz.apache.org/bugzilla/show_bug.cgi?id=61105
--- Comment #10 from Violeta Georgieva <violet...@apache.org> --- (In reply to Konstantin Kolinko from comment #9) > (In reply to Violeta Georgieva from comment #8) > > Any comments? > > Generally: I like it. > > 1. Typo in method name: obtainDateFormPath s/Form/From/ Fixed > 2. Building a pattern, > > > pattern = Pattern.compile("^(" + prefix + ")\\d{4}-\\d{1,2}-\\d{1,2}(" + > > suffix + ")$"); > > This should use (Pattern.quote(prefix) + "..." + Pattern.quote(suffix)) > > Prefix and suffix can contain special characters, e.g. '.' = any character. > Wrapping them with Pattern.quote() solves this issue. > Fixed, added a test also > 3. Temporary directory handling in unit test > > There is a base Test class that provides support for temporary directories, > > https://github.com/apache/tomcat/blob/trunk/test/org/apache/catalina/startup/ > LoggingBaseTest.java > > Differences: > - It respects system property "tomcat.test.temp" > - It uses creates a random directory for the test, to allow running several > tests in parallel > tempDir = Files.createTempDirectory(tempBasePath, "test").toFile(); > > Maybe it is not a good idea to use LoggingBaseTest directly as a base class, > as it initializes logging and this test tests logging, but it can be used to > copy some code. Fixed Thanks for the review, Violeta -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org