[squeak-dev] The Trunk: Network-ul.43.mcz
Igor Stasenko
siguctua at gmail.com
Mon Dec 14 15:06:33 UTC 2009
2009/12/14 <commits at source.squeak.org>:
> Levente Uzonyi uploaded a new version of Network to project The Trunk:
> http://source.squeak.org/trunk/Network-ul.43.mcz
>
> ==================== Summary ====================
>
> Name: Network-ul.43
> Author: ul
> Time: 14 December 2009, 2:59:36 am
> UUID: e14321f4-7104-4745-bda1-c3138b4f537f
> Ancestors: Network-ar.42
>
> - fix: use isKindOf: String instead of class == String
>
> =============== Diff against Network-ar.42 ===============
>
> Item was changed:
> ----- Method: HTTPSocket class>>useProxyServerNamed:port: (in category 'proxy settings') -----
> useProxyServerNamed: proxyServerName port: portNum
> "Direct all HTTP requests to the HTTP proxy server with the given name and port number."
>
> proxyServerName ifNil: [ "clear proxy settings"
> self httpProxyServer: nil.
> self httpProxyPort: 80.
> ^ self].
>
> proxyServerName isString
> ifFalse: [self error: 'Server name must be a String or nil'].
> self httpProxyServer: proxyServerName.
>
> self httpProxyPort: portNum.
> + (self httpProxyPort isKindOf: String) ifTrue: [HTTPPort := portNum asNumber].
> - self httpProxyPort class == String ifTrue: [HTTPPort := portNum asNumber].
why not just do:
portNum ifNotNil: [
self httpProxyPort: portNum asNumber.
] ifNil: [ ... ]
and get rid of class checking altogether?
> self httpProxyPort ifNil: [self httpProxyPort: self defaultPort].!
>
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|