Closed Bug 724200 Opened 13 years ago Closed 13 years ago

SyncStorageRequest.delete() results in NullPointerException

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P2)

ARM
Android
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla13

People

(Reporter: emtwo, Assigned: emtwo)

References

Details

(Whiteboard: [qa-])

addHeader() in delete() should only be called once resource.request has been initialized
Priority: -- → P2
Per IRC discussion: 20:48:57 <@rnewman> err, yeah, that's all completely wrong, isn't it? 20:50:47 <@rnewman> two possibilities 20:50:54 <@rnewman> one: override delete, so you would 20:51:10 <@rnewman> foo = new HttpDelete(this.uri); 20:51:16 <@rnewman> foo.addHeader(...); 20:51:19 <@rnewman> this.go(foo); 20:52:26 <@rnewman> two: check for delete in SyncStorageResourceDelegate.addHeaders, and add the header there 20:52:40 <@rnewman> I prefer the second option, marina 20:52:49 <@rnewman> good catch :) 20:53:06 < marina> ah, excellent, glad you agree that was weird 20:53:11 < marina> thanks! 20:53:54 <@rnewman> "check for delete": if (request instanceof HttpDelete) { ... 20:54:17 <@rnewman> or 20:54:18 <@rnewman> better 20:54:28 <@rnewman> if (request.getMethod.equalsIgnoreCase("DELETE")) 20:54:43 <@rnewman> there would be an awful edge case bug hiding there This is what happens when you don't write tests :D
OS: All → Android
Blocks: 724328
Status: NEW → RESOLVED
Closed: 13 years ago
Hardware: x86 → ARM
Resolution: --- → FIXED
Whiteboard: [qa-]
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.