[xwiki-devs] [VOTE] Stop filtering the filename in XWikiAttachment#setFilename
Hi devs, Here is what XWikiAttachment#setFilename looks like public void setFilename(String filename) { filename = filename.replaceAll("\\+", " "); if (!filename.equals(this.filename)) { setMetaDataDirty(true); this.filename = filename; } this.reference = null; } Seriously ? That does not make any sense and there is not even a comment for it. I would go for removing this replaceAll and forget about anything that really expect this API to do something that bad and avoid retro-compatibility nightmare. WDYT ? Here is my +1. -- Thomas Mortagne
+1 Best Regards, /Andreas 2012-06-18 10:41, Thomas Mortagne skrev:
Hi devs,
Here is what XWikiAttachment#setFilename looks like
public void setFilename(String filename) { filename = filename.replaceAll("\\+", " "); if (!filename.equals(this.filename)) { setMetaDataDirty(true); this.filename = filename; } this.reference = null; }
Seriously ?
That does not make any sense and there is not even a comment for it.
I would go for removing this replaceAll and forget about anything that really expect this API to do something that bad and avoid retro-compatibility nightmare.
WDYT ?
Here is my +1.
+1 Thanks, Caleb On 06/18/2012 04:41 AM, Thomas Mortagne wrote:
Hi devs,
Here is what XWikiAttachment#setFilename looks like
public void setFilename(String filename) { filename = filename.replaceAll("\\+", " "); if (!filename.equals(this.filename)) { setMetaDataDirty(true); this.filename = filename; } this.reference = null; }
Seriously ?
That does not make any sense and there is not even a comment for it.
I would go for removing this replaceAll and forget about anything that really expect this API to do something that bad and avoid retro-compatibility nightmare.
WDYT ?
Here is my +1.
On 06/18/2012 04:41 AM, Thomas Mortagne wrote:
Hi devs,
Here is what XWikiAttachment#setFilename looks like
public void setFilename(String filename) { filename = filename.replaceAll("\\+", " "); if (!filename.equals(this.filename)) { setMetaDataDirty(true); this.filename = filename; } this.reference = null; }
Seriously ?
That does not make any sense and there is not even a comment for it.
I would go for removing this replaceAll and forget about anything that really expect this API to do something that bad and avoid retro-compatibility nightmare.
WDYT ?
Here is my +1.
+1. -- Sergiu Dumitriu http://purl.org/net/sergiu/
4 +1 and no other vote, doing it now On Mon, Jun 18, 2012 at 10:41 AM, Thomas Mortagne <[email protected]> wrote:
Hi devs,
Here is what XWikiAttachment#setFilename looks like
public void setFilename(String filename) { filename = filename.replaceAll("\\+", " "); if (!filename.equals(this.filename)) { setMetaDataDirty(true); this.filename = filename; } this.reference = null; }
Seriously ?
That does not make any sense and there is not even a comment for it.
I would go for removing this replaceAll and forget about anything that really expect this API to do something that bad and avoid retro-compatibility nightmare.
WDYT ?
Here is my +1.
-- Thomas Mortagne
-- Thomas Mortagne
participants (4)
-
Andreas Jonsson -
Caleb James DeLisle -
Sergiu Dumitriu -
Thomas Mortagne