You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Denis Molony (Created) (JIRA)" <ji...@apache.org> on 2012/04/13 12:39:20 UTC
[jira] [Created] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
-------------------------------------------------------------------
Key: NET-458
URL: https://issues.apache.org/jira/browse/NET-458
Project: Commons Net
Issue Type: Bug
Components: FTP
Affects Versions: 3.1, 3.0.1
Environment: zOS
Reporter: Denis Molony
Line 360 in MVSFTPEntryParser.parseSimpleEntry :
String name = entry.split(" ")[0];
gives an ArrayIndexOutOfBoundsException: 0
It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
This is the method, if it helps:
private boolean parseSimpleEntry(FTPFile file, String entry) {
if (entry != null && entry.length() > 0) {
file.setRawListing(entry);
String name = entry.split(" ")[0]; // <--- error occurs here
file.setName(name);
file.setType(FTPFile.FILE_TYPE);
return true;
}
return false;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Denis Molony (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253285#comment-13253285 ]
Denis Molony commented on NET-458:
----------------------------------
The PDS contains many members, but all of them appear to have unreadable names (unprintable characters?). There is no other member information available, so that part of the string is definitely blank.
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Sebb (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated NET-458:
---------------------
Description:
Line 360 in MVSFTPEntryParser.parseSimpleEntry :
String name = entry.split(" ")[0];
gives an ArrayIndexOutOfBoundsException: 0
It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
This is the method, if it helps:
{code}
private boolean parseSimpleEntry(FTPFile file, String entry) {
if (entry != null && entry.length() > 0) {
file.setRawListing(entry);
String name = entry.split(" ")[0]; // <--- error occurs here
file.setName(name);
file.setType(FTPFile.FILE_TYPE);
return true;
}
return false;
}
{code}
was:
Line 360 in MVSFTPEntryParser.parseSimpleEntry :
String name = entry.split(" ")[0];
gives an ArrayIndexOutOfBoundsException: 0
It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
This is the method, if it helps:
private boolean parseSimpleEntry(FTPFile file, String entry) {
if (entry != null && entry.length() > 0) {
file.setRawListing(entry);
String name = entry.split(" ")[0]; // <--- error occurs here
file.setName(name);
file.setType(FTPFile.FILE_TYPE);
return true;
}
return false;
}
Fix layout
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Denis Molony (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Molony updated NET-458:
-----------------------------
Description:
Line 360 in MVSFTPEntryParser.parseSimpleEntry :
String name = entry.split(" ")[0];
gives an ArrayIndexOutOfBoundsException: 0
It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
This is the method, if it helps:
private boolean parseSimpleEntry(FTPFile file, String entry) {
if (entry != null && entry.length() > 0) {
file.setRawListing(entry);
String name = entry.split(" ")[0]; // <--- error occurs here
file.setName(name);
file.setType(FTPFile.FILE_TYPE);
return true;
}
return false;
}
was:
Line 360 in MVSFTPEntryParser.parseSimpleEntry :
String name = entry.split(" ")[0];
gives an ArrayIndexOutOfBoundsException: 0
It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
This is the method, if it helps:
private boolean parseSimpleEntry(FTPFile file, String entry) {
if (entry != null && entry.length() > 0) {
file.setRawListing(entry);
String name = entry.split(" ")[0]; // <--- error occurs here
file.setName(name);
file.setType(FTPFile.FILE_TYPE);
return true;
}
return false;
}
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253283#comment-13253283 ]
Sebb commented on NET-458:
--------------------------
Looks like the problem is caused by trying to split a string containing only space(s)
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Sebb (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved NET-458.
----------------------
Resolution: Fixed
Thanks for the report. Fixed in SVN, and a new SNAPSHOT has been uploaded to the ASF snapshots repo [1].
[1] http://repository.apache.org/snapshots/
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (NET-458) MVSFTPEntryParser.parseSimpleEntry -
ArrayIndexOutOfBoundsException
Posted by "Denis Molony (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253294#comment-13253294 ]
Denis Molony commented on NET-458:
----------------------------------
Thanks, that fixed it.
> MVSFTPEntryParser.parseSimpleEntry - ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------
>
> Key: NET-458
> URL: https://issues.apache.org/jira/browse/NET-458
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0.1, 3.1
> Environment: zOS
> Reporter: Denis Molony
>
> Line 360 in MVSFTPEntryParser.parseSimpleEntry :
> String name = entry.split(" ")[0];
> gives an ArrayIndexOutOfBoundsException: 0
> It appears to be caused by a partitioned dataset whose members only contain names. No other details (creation date, file type etc).
> This is the method, if it helps:
> {code}
> private boolean parseSimpleEntry(FTPFile file, String entry) {
> if (entry != null && entry.length() > 0) {
> file.setRawListing(entry);
> String name = entry.split(" ")[0]; // <--- error occurs here
> file.setName(name);
> file.setType(FTPFile.FILE_TYPE);
> return true;
> }
> return false;
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira