Opened 14 years ago

Closed 12 years ago

#97 closed defect (invalid)

Comparing dojo.uri.Uri with == can be misleading ... class needs a comparator?

Reported by: sjmiles@… Owned by: sjmiles
Priority: high Milestone: 0.9
Component: General Version: 0.1
Keywords: Cc:
Blocked By: Blocking:

Description

There is at least one place (dojo.xml.htmlUtil.insertCssFile) where Uri objects are compared with == (reference equality) when a 'value' comparison of the objects is intended.

Probably dojo.uri.Uri needs a comparator function.

At least, insertCssFile needs to be modified so it's testing e.g., the toString()values of each object. Also, we should watch out for other places where Uri's are compared with ==.

Re: severity, having a comparator (or not) in Uri is not a big deal, the bug in insertCssFile is potentially worse. Anyway, I left the severity at Normal.

Change History (6)

comment:1 Changed 14 years ago by anonymous

Summary: Comparing dojo.uri.Uri with == can be misleader ... class needs a comparator?Comparing dojo.uri.Uri with == can be misleading ... class needs a comparator?

comment:2 Changed 14 years ago by psowden

Owner: changed from Tom to anonymous
Status: newassigned

The Url Object should resolve the two URIs and then compare them in a normalised form.

taking.

comment:3 Changed 14 years ago by psowden

Owner: changed from anonymous to psowden
Status: assignednew

bleh

comment:4 Changed 13 years ago by dylan

Milestone: 0.5

comment:5 Changed 12 years ago by Adam Peller

Owner: changed from psowden to sjmiles

Scott - a real oldie. I don't think this is valid anymore, would you agree?

comment:6 Changed 12 years ago by sjmiles

Resolution: invalid
Status: newclosed

I believe irrelevant to 0.9

Note: See TracTickets for help on using tickets.