Makes sense Mathieu,

I'll...

Jacques

Le 10/08/2019 à 18:43, Mathieu Lirzin a écrit :
Hello Jacques,

jler...@apache.org writes:

-            File dir = new File(imageServerPath + dirPath);
+            File dir = new File(imageServerPath + 
dirPath).toPath().normalize().toFile(); // cf. OFBIZ-9973
IMO This comment should include a short rationale too.  Referencing a
bug report is really useful when the issue is complex and the reader
might want to understand the details leading to a non-obvious piece of
code, but it would be better to *not* require the developers to do the
extra work of looking at JIRA to get a broad idea of the rationale. I
would recommend the something like:

--8<---------------cut here---------------start------------->8---
// Normalize the path because we want to ensure that ... (see OFBIZ-9973 for 
more details).
--8<---------------cut here---------------end--------------->8---

Additionally in order to avoid repeating such comment in multiple places
creating a helper method factorizing the code related to fixing that
issue and putting the comment ontop of the method definition is nice
too.

My 2¢.

Thanks Jacques.

Reply via email to