bugGNUstep - Bugs: bug #30951, The call of [NSString...

Group
 
 

bug #30951: The call of [NSString -initWithContentsOfURL:encoding:error:] is breaked by an exception

Submitter:  Sergei Golovin <svg>
Submitted:  Fri 03 Sep 2010 07:20:12 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 30 Sep 2010 07:31:07 AM UTC, comment #2: 

This bug should be closed due to changes in NSString.m r31273.

Sergei Golovin <svg>
Fri 03 Sep 2010 07:23:33 AM UTC, comment #1: 

Sorry, I didn't mention the bug category "Base/Foundation"

My environment:
ubuntu 9.10
base r31231

Sergei Golovin <svg>
Fri 03 Sep 2010 07:20:12 AM UTC, original submission:  

The exception NSInvalidArgumentException is picked up at the line 1516 of NSString.m:
==================================================================
- (id) initWithContentsOfURL: (NSURL*)url
                    encoding: (NSStringEncoding)enc
                       error: (NSError**)error
{
  NSData                *d;
  unsigned int          len;

  d = [[NSDataClass alloc] dataWithContentsOfURL: url]; // <- exception

==================================================================

But there is no an instance method -dataWithContentsOfURL: of NSData.

The class method +dataWithContentsOfURL: of NSData works well for me (see the attached patch).

Sergei Golovin <svg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Updated the item)
  • -email is unavailable- added by svg
  • -email is unavailable- added by svg (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-09-30 CaS CategoryNone Base/Foundation
        StatusNone Fixed
        Open/ClosedOpen Closed
    2010-09-30 svg Carbon-Copy- Added cas
    2010-09-03 svg Attached File- Added NSString_dataWithContentsOfURL.patch, #21379

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code