[squeak-dev] The Trunk: Network-pre.259.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Apr 22 19:04:36 UTC 2022
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.259.mcz
==================== Summary ====================
Name: Network-pre.259
Author: pre
Time: 22 April 2022, 9:04:29.632677 pm
UUID: 2072b4ec-3168-4447-9348-51d1ec7178dc
Ancestors: Network-mt.258
Refactors the implementation of #= in Url and its subclasses to remove the redundant parts from subclasses.
=============== Diff against Network-mt.258 ===============
Item was removed:
- ----- Method: FileUrl>>= (in category 'comparing') -----
- = anObject
-
- self == anObject ifTrue: [^ true].
-
- self class == anObject class ifFalse: [^ false].
- self fragment = anObject fragment ifFalse: [ ^ false ].
-
- self host = anObject host ifFalse: [ ^ false ].
- self path = anObject path ifFalse: [ ^ false ].
-
- ^ true!
Item was added:
+ ----- Method: FileUrl>>hasSameSchemeSpecificPartAs: (in category 'comparing') -----
+ hasSameSchemeSpecificPartAs: anotherUrl
+
+ self host = anotherUrl host ifFalse: [^ false].
+ self path = anotherUrl path ifFalse: [^ false].
+ ^ true!
Item was removed:
- ----- Method: GenericUrl>>= (in category 'comparing') -----
- = anObject
-
- self == anObject ifTrue: [^ true].
-
- self class == anObject class ifFalse: [^ false].
- self fragment = anObject fragment ifFalse: [ ^ false ].
-
- self schemeName = anObject schemeName ifFalse: [ ^ false ].
- self locator = anObject locator ifFalse: [ ^ false ].
-
- ^ true!
Item was added:
+ ----- Method: GenericUrl>>hasSameSchemeSpecificPartAs: (in category 'comparing') -----
+ hasSameSchemeSpecificPartAs: anotherUrl
+
+ self locator = anotherUrl locator ifFalse: [^ false].
+ ^ true!
Item was removed:
- ----- Method: HierarchicalUrl>>= (in category 'comparing') -----
- = anObject
-
- self == anObject ifTrue: [^ true].
-
- self class == anObject class ifFalse: [^ false].
- self fragment = anObject fragment ifFalse: [ ^ false ].
-
- self schemeName = anObject schemeName ifFalse: [ ^ false ].
- self authority = anObject authority ifFalse: [ ^ false ].
- self path = anObject path ifFalse: [ ^ false ].
- self query = anObject query ifFalse: [ ^ false ].
- self port = anObject port ifFalse: [ ^ false ].
- self username = anObject username ifFalse: [ ^ false ].
- self password = anObject password ifFalse: [ ^ false ].
-
- ^ true!
Item was added:
+ ----- Method: HierarchicalUrl>>hasSameSchemeSpecificPartAs: (in category 'comparing') -----
+ hasSameSchemeSpecificPartAs: anotherUrl
+
+ self authority = anotherUrl authority ifFalse: [^ false].
+ self path = anotherUrl path ifFalse: [^ false].
+ self query = anotherUrl query ifFalse: [^ false].
+ self port = anotherUrl port ifFalse: [^ false].
+ self username = anotherUrl username ifFalse: [^ false].
+ self password = anotherUrl password ifFalse: [^ false].
+ ^ true!
Item was added:
+ ----- Method: HttpUrl>>hasSameSchemeSpecificPartAs: (in category 'comparing') -----
+ hasSameSchemeSpecificPartAs: anotherUrl
+
+ (super hasSameSchemeSpecificPartAs: anotherUrl) ifFalse: [^ false].
+ self realm = anotherUrl realm ifFalse: [^ false].
+ ^ true!
Item was added:
+ ----- Method: Url>>= (in category 'comparing') -----
+ = anotherUrl
+
+ self == anotherUrl ifTrue: [^ true].
+ self class == anotherUrl class ifFalse: [^ false].
+
+ self schemeName = anotherUrl schemeName ifFalse: [^ false].
+ (self hasSameSchemeSpecificPartAs: anotherUrl) ifFalse: [^ false].
+ self fragment = anotherUrl fragment ifFalse: [ ^ false ].
+
+ ^ true!
Item was added:
+ ----- Method: Url>>hasSameSchemeSpecificPartAs: (in category 'comparing') -----
+ hasSameSchemeSpecificPartAs: anotherUrl
+ "Should check whether this Url and the other Url are equal in their scheme specific parts.
+ This is hook is called by Url>>#=, which already checks schemeName and fragments, so no need to check them in your implementation of this method."
+
+ self subclassResponsibility!
More information about the Squeak-dev
mailing list
|