[INT-1921] INT-1885 causes the default remote-file-separator to be initialized to an empty string, rather than the previous default of "/" Created: 28/May/11  Updated: 18/Jul/11  Resolved: 31/May/11

Status: Closed
Project: Spring Integration
Component/s: File Support
Affects Version/s: 2.0.4
Fix Version/s: 2.0.5

Type: Bug Priority: Minor
Reporter: Pavel Tcholakov Assignee: Oleg Zhurakousky
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: 0.5h
Time Spent: Not Specified
Original Estimate: 0.5h
Environment:

Any


Attachments: Text File default-remote-file-separator.patch    
Reference URL: http://forum.springsource.org/showthread.php?109947-2.0.4.RELEASE-make-sure-your-SFTP-directories-have-a-trailing-slash!&p=364552#post364552

 Description   

Up to Spring Integration 2.0.3, not specifying a remote-file-separator for inbound SFTP/FTP adapters would set a default value of "/". In 2.0.4, the implicit default accidentally changed to "".



 Comments   
Comment by Mark Fisher [ 28/May/11 ]

There are 2 options here. One is to use element.hasAttribute() in order to distinguish between nothing being provided and the end-user configuring just an empty string (see INT-1885). The other option is to define / as the "default" in the XML schema as well (which has the advantage of being self-documenting). In either case, the default "/" should remain in the underlying class - it's just that currently that value is always being overridden since getAttribute() never returns null.

Comment by Pavel Tcholakov [ 28/May/11 ]

I quite like the idea of adding it to the XSD - as long as the default is "/" in the Java source code as well as you say.

Comment by Oleg Zhurakousky [ 31/May/11 ]

Fixed. The '/' was added as a default to the schema of both FTP and SFTP.

Generated at Tue Feb 25 19:21:36 UTC 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.