You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Thomas FRIOL (JIRA)" <ji...@apache.org> on 2006/09/01 17:02:22 UTC
[jira] Created: (HADOOP-501) toString(resources, sb) in
Configuration.java throws a ClassCastException since resources can be
loaded from an URL
toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL
-------------------------------------------------------------------------------------------------------------------
Key: HADOOP-501
URL: http://issues.apache.org/jira/browse/HADOOP-501
Project: Hadoop
Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Thomas FRIOL
Priority: Minor
Attachments: Configuration.java.patch
Object obj = i.next();
if (obj instanceof Path) {
sb.append((Path)obj);
} else {
sb.append((String)obj);
}
If obj is an URL -> ClassCastException.
Moreover, I think the test before appending the resource to the StringBuffer is not really necessary since the method take an Object as argument. Why not simply have :
Object obj = i.next();
sb.append(obj);
I have attached a patch to fix this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HADOOP-501) toString(resources, sb) in
Configuration.java throws a ClassCastException since resources can be
loaded from an URL
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-501?page=all ]
Doug Cutting resolved HADOOP-501.
---------------------------------
Fix Version/s: 0.6.0
Resolution: Fixed
> toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-501
> URL: http://issues.apache.org/jira/browse/HADOOP-501
> Project: Hadoop
> Issue Type: Bug
> Affects Versions: 0.5.0
> Reporter: Thomas FRIOL
> Priority: Minor
> Fix For: 0.6.0
>
> Attachments: Configuration.java.patch
>
>
> Object obj = i.next();
> if (obj instanceof Path) {
> sb.append((Path)obj);
> } else {
> sb.append((String)obj);
> }
> If obj is an URL -> ClassCastException.
> Moreover, I think the test before appending the resource to the StringBuffer is not really necessary since the method take an Object as argument. Why not simply have :
> Object obj = i.next();
> sb.append(obj);
> I have attached a patch to fix this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-501) toString(resources, sb) in
Configuration.java throws a ClassCastException since resources can be
loaded from an URL
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-501?page=comments#action_12432655 ]
Doug Cutting commented on HADOOP-501:
-------------------------------------
I just committed this. The patch file was not properly generated (with 'svn diff' from the project root) but the change was simple enough to recreate. Thanks, Thomas!
> toString(resources, sb) in Configuration.java throws a ClassCastException since resources can be loaded from an URL
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-501
> URL: http://issues.apache.org/jira/browse/HADOOP-501
> Project: Hadoop
> Issue Type: Bug
> Affects Versions: 0.5.0
> Reporter: Thomas FRIOL
> Priority: Minor
> Fix For: 0.6.0
>
> Attachments: Configuration.java.patch
>
>
> Object obj = i.next();
> if (obj instanceof Path) {
> sb.append((Path)obj);
> } else {
> sb.append((String)obj);
> }
> If obj is an URL -> ClassCastException.
> Moreover, I think the test before appending the resource to the StringBuffer is not really necessary since the method take an Object as argument. Why not simply have :
> Object obj = i.next();
> sb.append(obj);
> I have attached a patch to fix this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira