diff --git a/src/XML-Parser-Tests-Conformance/XMLConformanceTest.class.st b/src/XML-Parser-Tests-Conformance/XMLConformanceTest.class.st index 29bb2b4a..8d64d39b 100644 --- a/src/XML-Parser-Tests-Conformance/XMLConformanceTest.class.st +++ b/src/XML-Parser-Tests-Conformance/XMLConformanceTest.class.st @@ -439,7 +439,7 @@ XMLConformanceTest >> ignorableParserExceptions [ { #category : #testing } XMLConformanceTest >> isIgnorableParserException: anError [ - ^ self ignorableParserExceptions notNil + ^ self ignorableParserExceptions isNotNil and: [self ignorableParserExceptions handles: anError] ] diff --git a/src/XML-Parser-Tests-Conformance/XMLConformanceVirtualFileExternalEntityResolver.class.st b/src/XML-Parser-Tests-Conformance/XMLConformanceVirtualFileExternalEntityResolver.class.st index b284fb07..d1a986da 100644 --- a/src/XML-Parser-Tests-Conformance/XMLConformanceVirtualFileExternalEntityResolver.class.st +++ b/src/XML-Parser-Tests-Conformance/XMLConformanceVirtualFileExternalEntityResolver.class.st @@ -47,7 +47,7 @@ XMLConformanceVirtualFileExternalEntityResolver >> resolveExternalEntityURI: anX withSelector: sourceSelector]. contents := self virtualFileClass perform: sourceSelector. - (aMaxSize notNil + (aMaxSize isNotNil and: [contents size > aMaxSize]) ifTrue: [ self diff --git a/src/XML-Parser-Tests/XMLDFALimitsTest.class.st b/src/XML-Parser-Tests/XMLDFALimitsTest.class.st index a497de8c..25869604 100644 --- a/src/XML-Parser-Tests/XMLDFALimitsTest.class.st +++ b/src/XML-Parser-Tests/XMLDFALimitsTest.class.st @@ -30,7 +30,7 @@ XMLDFALimitsTest >> testDFAStateCacheLimit [ visitedStates add: currentState. previousState := currentState. currentState := currentState nextDFAStateMatching: name. - self assert: currentState notNil. + self assert: currentState isNotNil. i = names size ifTrue: [ visitedStates do: [:each | diff --git a/src/XML-Parser-Tests/XMLDOMParserTest.class.st b/src/XML-Parser-Tests/XMLDOMParserTest.class.st index ffa5be10..d6832406 100644 --- a/src/XML-Parser-Tests/XMLDOMParserTest.class.st +++ b/src/XML-Parser-Tests/XMLDOMParserTest.class.st @@ -83,8 +83,8 @@ XMLDOMParserTest >> testAttributeNamespaces [ assert: (each attributeNames allSatisfy: [:name | (each attributeNodeAt: name namespaceURI: 'defaultNS') isNil]); - assert: (each attributeNodeAt: 'ps:family-name' namespaceURI: 'personNS') notNil; - assert: (each attributeNodeAt: 'ps:first-name' namespaceURI: 'personNS') notNil] + assert: (each attributeNodeAt: 'ps:family-name' namespaceURI: 'personNS') isNotNil; + assert: (each attributeNodeAt: 'ps:first-name' namespaceURI: 'personNS') isNotNil] ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLExceptionTest.class.st b/src/XML-Parser-Tests/XMLExceptionTest.class.st index 55c4fcdf..34e89e69 100644 --- a/src/XML-Parser-Tests/XMLExceptionTest.class.st +++ b/src/XML-Parser-Tests/XMLExceptionTest.class.st @@ -123,7 +123,7 @@ XMLExceptionTest >> testFormatSignalWith [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: '1' ] ] @@ -140,7 +140,7 @@ XMLExceptionTest >> testFormatSignalWithArguments [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: '1 two 3 four' ] ] @@ -154,7 +154,7 @@ XMLExceptionTest >> testFormatSignalWithWith [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: '1 two' ] ] @@ -173,7 +173,7 @@ XMLExceptionTest >> testFormatSignalWithWithWith [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: '1 two 3' ] ] @@ -193,7 +193,7 @@ XMLExceptionTest >> testFormatSignalWithWithWithWith [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: '1 two 3 four' ] ] @@ -224,7 +224,7 @@ XMLExceptionTest >> testSignalMessageFrom [ on: Error do: [ :exception | raisedException := exception ]. self - assert: raisedException notNil; + assert: raisedException isNotNil; assert: raisedException class identicalTo: self exceptionClass; assert: raisedException messageText equals: ('({1}) {2}' format: (Array diff --git a/src/XML-Parser-Tests/XMLHTTPRequestTest.class.st b/src/XML-Parser-Tests/XMLHTTPRequestTest.class.st index ebb2aef2..687adb3e 100644 --- a/src/XML-Parser-Tests/XMLHTTPRequestTest.class.st +++ b/src/XML-Parser-Tests/XMLHTTPRequestTest.class.st @@ -93,7 +93,7 @@ XMLHTTPRequestTest >> testEnableCompression [ request acceptEncoding do: [ :each | self assert: (XMLHTTPDecompressingReadStreamAdapterFactory classForCompression: - each) notNil ] + each) isNotNil ] ] { #category : #tests } diff --git a/src/XML-Parser-Tests/XMLIntegerReaderTest.class.st b/src/XML-Parser-Tests/XMLIntegerReaderTest.class.st index 7e964d1f..0221e797 100644 --- a/src/XML-Parser-Tests/XMLIntegerReaderTest.class.st +++ b/src/XML-Parser-Tests/XMLIntegerReaderTest.class.st @@ -132,7 +132,7 @@ XMLIntegerReaderTest >> testNonDigit [ uppercaseLetterInterval includes: each ] ]) ifTrue: [ self - assert: (reader nextIntegerWithBase: base) notNil; + assert: (reader nextIntegerWithBase: base) isNotNil; assert: reader atEnd ] ifFalse: [ self diff --git a/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st b/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st index 9e077b39..a80bc869 100644 --- a/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st +++ b/src/XML-Parser-Tests/XMLNodeWithChildrenTest.class.st @@ -263,7 +263,7 @@ XMLNodeWithChildrenTest >> testAllNodesDetect [ allNodes := nodeWithNodes allNodes. detectedNode := nodeWithNodes allNodesDetect: [ :each | each isPI ]. self - assert: detectedNode notNil; + assert: detectedNode isNotNil; assert: detectedNode isPI; assert: detectedNode equals: (allNodes detect: [ :each | each isPI ]); @@ -460,7 +460,7 @@ XMLNodeWithChildrenTest >> testDescendantNodesDetect [ detectedNode := nodeWithNodes descendantNodesDetect: [ :each | each isPI ]. self - assert: detectedNode notNil; + assert: detectedNode isNotNil; assert: detectedNode isPI; assert: detectedNode equals: (descendantNodes detect: [ :each | each isPI ]); @@ -728,7 +728,7 @@ XMLNodeWithChildrenTest >> testNodesDetect [ node := self newNodeWithNodes. detectedNode := node nodesDetect: [ :each | each isComment ]. self - assert: detectedNode notNil; + assert: detectedNode isNotNil; assert: detectedNode equals: (node nodes detect: [ :each | each isComment ]); assert: diff --git a/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st b/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st index 48819589..25fa9211 100644 --- a/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st +++ b/src/XML-Parser-Tests/XMLNodeWithElementsTest.class.st @@ -522,7 +522,7 @@ XMLNodeWithElementsTest >> testAllElementsDetect [ detectedElement := nodeWithElements allElementsDetect: [ :each | each isNamed: 'prefix:four' ]. self - assert: detectedElement notNil; + assert: detectedElement isNotNil; assert: (detectedElement isNamed: 'prefix:four'); assert: detectedElement equals: @@ -827,7 +827,7 @@ XMLNodeWithElementsTest >> testDescendantElementsDetect [ detectedElement := nodeWithElements descendantElementsDetect: [ :each | each isNamed: 'prefix:four' ]. self - assert: detectedElement notNil; + assert: detectedElement isNotNil; assert: (detectedElement isNamed: 'prefix:four'); assert: detectedElement equals: @@ -1152,8 +1152,8 @@ XMLNodeWithElementsTest >> testElementRenamingToNext [ usesNamespaces: false; allElementsDo: [ :each | | parent oldName oldLocalName nextElement | - ((parent := each parent) notNil and: [ - (nextElement := each nextElement) notNil ]) ifTrue: [ + ((parent := each parent) isNotNil and: [ + (nextElement := each nextElement) isNotNil ]) ifTrue: [ oldName := each name. oldLocalName := each localName. @@ -1180,8 +1180,8 @@ XMLNodeWithElementsTest >> testElementRenamingToPrevious [ usesNamespaces: false; allElementsDo: [ :each | | parent oldName oldLocalName previousElement | - ((parent := each parent) notNil and: [ - (previousElement := each previousElement) notNil ]) ifTrue: [ + ((parent := each parent) isNotNil and: [ + (previousElement := each previousElement) isNotNil ]) ifTrue: [ oldName := each name. oldLocalName := each localName. @@ -1453,7 +1453,7 @@ XMLNodeWithElementsTest >> testFindElementNamed [ allElements := nodeWithElements allElements. foundElement := nodeWithElements findElementNamed: 'four'. self - assert: foundElement notNil; + assert: foundElement isNotNil; assert: (foundElement isNamed: 'four'); assert: foundElement identicalTo: (allElements detect: [ :each | each isNamed: 'four' ]); @@ -1472,7 +1472,7 @@ XMLNodeWithElementsTest >> testFindElementNamedNamespaceURI [ findElementNamed: 'four' namespaceURI: 'testNS'. self - assert: foundElement notNil; + assert: foundElement isNotNil; assert: (foundElement isNamed: 'four'). self assert: foundElement @@ -1498,7 +1498,7 @@ XMLNodeWithElementsTest >> testFindElementNamedNamespaceURIWith [ namespaceURI: 'testNS' with: [ :each | each hasChildren ]. self - assert: foundElement notNil; + assert: foundElement isNotNil; assert: (foundElement isNamed: 'prefix:four'). self assert: foundElement @@ -1527,7 +1527,7 @@ XMLNodeWithElementsTest >> testFindElementNamedWith [ findElementNamed: 'four' with: [ :each | each hasChildren ]. self - assert: foundElement notNil; + assert: foundElement isNotNil; assert: (foundElement isNamed: 'four'). self assert: foundElement diff --git a/src/XML-Parser-Tests/XMLObservableListTest.class.st b/src/XML-Parser-Tests/XMLObservableListTest.class.st index b6a9e588..f503892f 100644 --- a/src/XML-Parser-Tests/XMLObservableListTest.class.st +++ b/src/XML-Parser-Tests/XMLObservableListTest.class.st @@ -79,7 +79,7 @@ XMLObservableListTest >> assertList: aList receivedNotificationOfReplacing: anOl XMLObservableListTest >> assertNotification: aNotification for: anObject withList: aList hasType: aSelectorCollection [ self - assert: aNotification notNil; + assert: aNotification isNotNil; assert: (aSelectorCollection includes: aNotification selector). self assert: aNotification arguments @@ -91,7 +91,7 @@ XMLObservableListTest >> assertNotification: aNotification for: anObject withLis { #category : #assertions } XMLObservableListTest >> denyList: aFirstList sharesObserverWith: aSecondList [ self deny: - (aFirstList observer notNil + (aFirstList observer isNotNil and: [aFirstList observer == aSecondList observer]) ] diff --git a/src/XML-Parser/DTDDoctypeDefinition.class.st b/src/XML-Parser/DTDDoctypeDefinition.class.st index 28509c5f..14e23a47 100644 --- a/src/XML-Parser/DTDDoctypeDefinition.class.st +++ b/src/XML-Parser/DTDDoctypeDefinition.class.st @@ -335,7 +335,7 @@ DTDDoctypeDefinition >> hasAttributeValidators [ DTDDoctypeDefinition >> hasElementIDReferences [ "direct access to avoid lazy initialization" - ^ elementIDValidator notNil + ^ elementIDValidator isNotNil and: [elementIDValidator hasIDReferences] ] @@ -343,7 +343,7 @@ DTDDoctypeDefinition >> hasElementIDReferences [ DTDDoctypeDefinition >> hasElementIDs [ "direct access to avoid lazy initialization" - ^ elementIDValidator notNil + ^ elementIDValidator isNotNil and: [elementIDValidator hasIDs] ] @@ -368,7 +368,7 @@ DTDDoctypeDefinition >> hasEntities [ DTDDoctypeDefinition >> hasGeneralEntities [ "direct access to avoid lazy initialization" - ^ generalEntities notNil + ^ generalEntities isNotNil and: [generalEntities isNotEmpty] ] @@ -383,27 +383,27 @@ DTDDoctypeDefinition >> hasNotationAttributeValidators [ DTDDoctypeDefinition >> hasNotations [ "direct access to avoid lazy initialization" - ^ notations notNil and: [ notations isNotEmpty ] + ^ notations isNotNil and: [ notations isNotEmpty ] ] { #category : #testing } DTDDoctypeDefinition >> hasParameterEntities [ "direct access to avoid lazy initialization" - ^ parameterEntities notNil and: [ parameterEntities isNotEmpty ] + ^ parameterEntities isNotNil and: [ parameterEntities isNotEmpty ] ] { #category : #testing } DTDDoctypeDefinition >> hasRoot [ - ^ root notNil and: [ root isNotEmpty ] + ^ root isNotNil and: [ root isNotEmpty ] ] { #category : #testing } DTDDoctypeDefinition >> hasUnparsedEntities [ "direct access to avoid lazy initialization" - ^ unparsedEntities notNil and: [ unparsedEntities isNotEmpty ] + ^ unparsedEntities isNotNil and: [ unparsedEntities isNotEmpty ] ] { #category : #'instance creation' } diff --git a/src/XML-Parser/DTDExternalEntityResolverLimitingDecorator.class.st b/src/XML-Parser/DTDExternalEntityResolverLimitingDecorator.class.st index 0e98f085..10bdf68a 100644 --- a/src/XML-Parser/DTDExternalEntityResolverLimitingDecorator.class.st +++ b/src/XML-Parser/DTDExternalEntityResolverLimitingDecorator.class.st @@ -27,7 +27,7 @@ DTDExternalEntityResolverLimitingDecorator >> checkExternalEntityLimit [ | maxExternalEntities | - ((maxExternalEntities := self externalEntityResolver maxExternalEntities) notNil + ((maxExternalEntities := self externalEntityResolver maxExternalEntities) isNotNil and: [self totalResolvedExternalEntities >= maxExternalEntities]) ifTrue: [self errorExternalEntityLimitExceeded] ] diff --git a/src/XML-Parser/DTDExternalParsedEntity.class.st b/src/XML-Parser/DTDExternalParsedEntity.class.st index 4ac5d754..61dd1db8 100644 --- a/src/XML-Parser/DTDExternalParsedEntity.class.st +++ b/src/XML-Parser/DTDExternalParsedEntity.class.st @@ -34,7 +34,7 @@ DTDExternalParsedEntity >> hasReplacement [ { #category : #testing } DTDExternalParsedEntity >> hasUnresolvedReplacement [ - ^ self unresolvedReplacement notNil + ^ self unresolvedReplacement isNotNil ] { #category : #testing } diff --git a/src/XML-Parser/DTDStaticExternalEntityResolver.class.st b/src/XML-Parser/DTDStaticExternalEntityResolver.class.st index 8e4cd598..2b6ec360 100644 --- a/src/XML-Parser/DTDStaticExternalEntityResolver.class.st +++ b/src/XML-Parser/DTDStaticExternalEntityResolver.class.st @@ -133,7 +133,7 @@ DTDStaticExternalEntityResolver >> resolveExternalEntityURI: anXMLURIOrURIString ifAbsent: [ self errorUnresolvableExternalEntityURI: anXMLURIOrURIString]. - (aMaxSize notNil + (aMaxSize isNotNil and: [replacement size > aMaxSize]) ifTrue: [ self diff --git a/src/XML-Parser/DTDSubsetParserDriver.class.st b/src/XML-Parser/DTDSubsetParserDriver.class.st index db30e6d3..524b7da0 100644 --- a/src/XML-Parser/DTDSubsetParserDriver.class.st +++ b/src/XML-Parser/DTDSubsetParserDriver.class.st @@ -97,7 +97,7 @@ DTDSubsetParserDriver >> handleAttributeDeclaration: anElement name: anAttribute defaultValue: aDefaultValue]. (self isValidating - and: [newAttributeValidator notNil]) + and: [newAttributeValidator isNotNil]) ifTrue: [newAttributeValidator validateAttributeDeclaration]. ] diff --git a/src/XML-Parser/XMLAbstractFactory.class.st b/src/XML-Parser/XMLAbstractFactory.class.st index 1a0458e6..bcec1a2f 100644 --- a/src/XML-Parser/XMLAbstractFactory.class.st +++ b/src/XML-Parser/XMLAbstractFactory.class.st @@ -33,7 +33,7 @@ XMLAbstractFactory class >> findSupportedImplementation [ self isSupportedImplementation ifTrue: [^ self]. - (self preferredImplementation notNil + (self preferredImplementation isNotNil and: [self preferredImplementation isSupportedImplementation]) ifTrue: [^ self preferredImplementation]. self allSubclassesDo: [:each | @@ -45,7 +45,7 @@ XMLAbstractFactory class >> findSupportedImplementation [ { #category : #testing } XMLAbstractFactory class >> hasSupportedImplementation [ - ^ self findSupportedImplementation notNil + ^ self findSupportedImplementation isNotNil ] { #category : #accessing } diff --git a/src/XML-Parser/XMLCachingNodeList.class.st b/src/XML-Parser/XMLCachingNodeList.class.st index f287fd80..934a77ea 100644 --- a/src/XML-Parser/XMLCachingNodeList.class.st +++ b/src/XML-Parser/XMLCachingNodeList.class.st @@ -254,7 +254,7 @@ XMLCachingNodeList >> firstElement [ { #category : #testing } XMLCachingNodeList >> hasElements [ - ^ cachedElements notNil and: [cachedElements isNotEmpty] + ^ cachedElements isNotNil and: [cachedElements isNotEmpty] ] { #category : #testing } diff --git a/src/XML-Parser/XMLDocument.class.st b/src/XML-Parser/XMLDocument.class.st index aa98f3a2..2fffb4ca 100644 --- a/src/XML-Parser/XMLDocument.class.st +++ b/src/XML-Parser/XMLDocument.class.st @@ -83,12 +83,12 @@ XMLDocument >> errorCannotHaveNonElementRoot [ { #category : #testing } XMLDocument >> hasDoctypeDeclaration [ - ^ self doctypeDeclaration notNil + ^ self doctypeDeclaration isNotNil ] { #category : #testing } XMLDocument >> hasDoctypeDefinition [ - ^ self doctypeDefinition notNil + ^ self doctypeDefinition isNotNil ] { #category : #testing } @@ -98,7 +98,7 @@ XMLDocument >> hasEncoding [ { #category : #testing } XMLDocument >> hasRoot [ - ^ self root notNil + ^ self root isNotNil ] { #category : #private } diff --git a/src/XML-Parser/XMLElement.class.st b/src/XML-Parser/XMLElement.class.st index 2e95076a..71db9cf2 100644 --- a/src/XML-Parser/XMLElement.class.st +++ b/src/XML-Parser/XMLElement.class.st @@ -157,7 +157,7 @@ XMLElement >> allNamespaceScopesRemapPrefix: aPrefix from: anOldURIOrNil to: aNe to: aNewURI. "we only need to check the attributes if we've remapped an existing, non-default namespace" - (anOldURIOrNil notNil + (anOldURIOrNil isNotNil and: [aPrefix size > 0]) ifTrue: [self validateNamespacePrefixesOfAttributes]. self elementsDo: [:each | @@ -398,12 +398,12 @@ XMLElement >> hasID: anID [ self hasAttributes ifFalse: [^ false]. - ((document := self document) notNil - and: [(doctypeDefinition := document doctypeDefinition) notNil + ((document := self document) isNotNil + and: [(doctypeDefinition := document doctypeDefinition) isNotNil and: [doctypeDefinition hasAttributeValidators and: [ (attributeValidators := - doctypeDefinition attributeValidatorsAt: self name) notNil]]]) + doctypeDefinition attributeValidatorsAt: self name) isNotNil]]]) ifTrue: [ ^ self hasUndeclaredOrDeclaredID: anID diff --git a/src/XML-Parser/XMLElementIDValidator.class.st b/src/XML-Parser/XMLElementIDValidator.class.st index 661d2c84..2e5d5cc7 100644 --- a/src/XML-Parser/XMLElementIDValidator.class.st +++ b/src/XML-Parser/XMLElementIDValidator.class.st @@ -49,13 +49,13 @@ XMLElementIDValidator >> errorUnknownIDReference: anID [ { #category : #testing } XMLElementIDValidator >> hasIDReferences [ - ^ idReferences notNil + ^ idReferences isNotNil and: [idReferences isNotEmpty] ] { #category : #testing } XMLElementIDValidator >> hasIDs [ - ^ ids notNil + ^ ids isNotNil and: [ids isNotEmpty] ] diff --git a/src/XML-Parser/XMLEncodingDetector.class.st b/src/XML-Parser/XMLEncodingDetector.class.st index 614c0250..0a69f177 100644 --- a/src/XML-Parser/XMLEncodingDetector.class.st +++ b/src/XML-Parser/XMLEncodingDetector.class.st @@ -198,7 +198,7 @@ XMLEncodingDetector >> peek [ XMLEncodingDetector >> peekForASCII [ | byte | - ((byte := self peek) notNil + ((byte := self peek) isNotNil and: [byte < 16r80]) ifTrue: [ self next. @@ -219,7 +219,7 @@ XMLEncodingDetector >> peekForNull [ XMLEncodingDetector >> peekForUTF8LeadingByte [ | byte | - ((byte := self peek) notNil + ((byte := self peek) isNotNil and: [self isUTF8LeadingByte: byte]) ifTrue: [ self next. @@ -231,7 +231,7 @@ XMLEncodingDetector >> peekForUTF8LeadingByte [ XMLEncodingDetector >> peekForUTF8NonLeadingByte [ | byte | - ((byte := self peek) notNil + ((byte := self peek) isNotNil and: [byte < 16rC0 and: [byte > 16r80]]) ifTrue: [ diff --git a/src/XML-Parser/XMLFileDirectoryFileHandle.class.st b/src/XML-Parser/XMLFileDirectoryFileHandle.class.st index fa57c304..30ead852 100644 --- a/src/XML-Parser/XMLFileDirectoryFileHandle.class.st +++ b/src/XML-Parser/XMLFileDirectoryFileHandle.class.st @@ -43,7 +43,7 @@ XMLFileDirectoryFileHandle >> directoryEntry [ { #category : #testing } XMLFileDirectoryFileHandle >> exists [ - ^ self directoryEntry notNil + ^ self directoryEntry isNotNil ] { #category : #accessing } diff --git a/src/XML-Parser/XMLFileHandle.class.st b/src/XML-Parser/XMLFileHandle.class.st index 9b634e51..b33c2842 100644 --- a/src/XML-Parser/XMLFileHandle.class.st +++ b/src/XML-Parser/XMLFileHandle.class.st @@ -293,7 +293,7 @@ XMLFileHandle >> streamGet [ { #category : #resolving } XMLFileHandle >> streamGetUpToLimit: aMaxSize decoding: aBoolean [ - (aMaxSize notNil + (aMaxSize isNotNil and: [self size > aMaxSize]) ifTrue: [self errorFileExceedsMaxSize: aMaxSize]. diff --git a/src/XML-Parser/XMLHTTPDecompressingReadStreamAdapterFactory.class.st b/src/XML-Parser/XMLHTTPDecompressingReadStreamAdapterFactory.class.st index b1e6e29b..6e211b6f 100644 --- a/src/XML-Parser/XMLHTTPDecompressingReadStreamAdapterFactory.class.st +++ b/src/XML-Parser/XMLHTTPDecompressingReadStreamAdapterFactory.class.st @@ -48,7 +48,7 @@ XMLHTTPDecompressingReadStreamAdapterFactory class >> errorUnsupportedCompressio { #category : #testing } XMLHTTPDecompressingReadStreamAdapterFactory class >> isSupportedImplementation [ - ^ self decompressingReadStreamAdapterClass notNil + ^ self decompressingReadStreamAdapterClass isNotNil ] { #category : #'instance creation' } diff --git a/src/XML-Parser/XMLHTTPResponseContentReader.class.st b/src/XML-Parser/XMLHTTPResponseContentReader.class.st index ef6376b2..a65606cb 100644 --- a/src/XML-Parser/XMLHTTPResponseContentReader.class.st +++ b/src/XML-Parser/XMLHTTPResponseContentReader.class.st @@ -54,7 +54,7 @@ XMLHTTPResponseContentReader >> decodedContentReadStreamUpToEndWithCharset: aCha { #category : #private } XMLHTTPResponseContentReader >> ensureContentReadStreamWasNotLimited [ - (limitedContentReadStream notNil + (limitedContentReadStream isNotNil and: [limitedContentReadStream atLimitedEnd]) ifTrue: [self errorContentLimitExceeded] ] @@ -117,7 +117,7 @@ XMLHTTPResponseContentReader >> readUpToLimit: arg1 decoding: arg2 [ ifTrue: [ tmp1 := nil ] ifFalse: [ tmp1 > 0 ifFalse: [ ^ '' ]. - (arg1 notNil and: [ tmp1 > arg1 ]) ifTrue: [ + (arg1 isNotNil and: [ tmp1 > arg1 ]) ifTrue: [ self errorContentLimitExceeded ] ]. rawContent := self rawReadWithLength: tmp1 upToLimit: arg1. contentReadStream := rawContent readStream. @@ -125,7 +125,7 @@ XMLHTTPResponseContentReader >> readUpToLimit: arg1 decoding: arg2 [ (tmp3 := response contentEncoding) isNotEmpty ]) ifTrue: [ self initializeDecompressionWithSchemes: tmp3 upToLimit: arg1 ]. (arg2 and: [ - (tmp2 := response contentType) notNil and: [ + (tmp2 := response contentType) isNotNil and: [ (tmp4 := tmp2 charset) ~= tmp2 defaultCharset ] ]) ifTrue: [ tmp5 := self decodedContentReadStreamUpToEndWithCharset: tmp4 ] @@ -143,7 +143,7 @@ XMLHTTPResponseContentReader >> setResponse: aResponse [ { #category : #streaming } XMLHTTPResponseContentReader >> undecodedContentReadStreamUpToEnd [ ^ (isDecompressing - or: [limitedContentReadStream notNil]) + or: [limitedContentReadStream isNotNil]) ifTrue: [self contentReadStreamUpToEnd] ifFalse: [rawContent] ] diff --git a/src/XML-Parser/XMLHTTPWebClientResponseContentReader.class.st b/src/XML-Parser/XMLHTTPWebClientResponseContentReader.class.st index 083aa174..a66a578a 100644 --- a/src/XML-Parser/XMLHTTPWebClientResponseContentReader.class.st +++ b/src/XML-Parser/XMLHTTPWebClientResponseContentReader.class.st @@ -30,7 +30,7 @@ XMLHTTPWebClientResponseContentReader >> rawReadWithLength: aContentLength upToL size: aContentLength progress: ((aContentLength isNil - and: [aMaxSize notNil]) + and: [aMaxSize isNotNil]) ifTrue: [ [:ignored :total | total > aMaxSize diff --git a/src/XML-Parser/XMLIntegerReader.class.st b/src/XML-Parser/XMLIntegerReader.class.st index d304327c..6762f677 100644 --- a/src/XML-Parser/XMLIntegerReader.class.st +++ b/src/XML-Parser/XMLIntegerReader.class.st @@ -120,7 +120,7 @@ XMLIntegerReader >> nextDigitWithBase: aBase [ ((asciiValue := self peek asciiValue) > 0 and: [asciiValue <= CharacterDigitValues size - and: [(digit := CharacterDigitValues at: asciiValue) notNil + and: [(digit := CharacterDigitValues at: asciiValue) isNotNil and: [digit < aBase]]]) ifTrue: [ self next. @@ -176,12 +176,12 @@ XMLIntegerReader >> nextIntegerWithBase: aBase upToLimit: aReadLimit [ maxBaseValue := (maxValue / aBase) floor]. readLimit := aReadLimit. [self atEnd - or: [(readLimit notNil and: [readLimit <= 0]) + or: [(readLimit isNotNil and: [readLimit <= 0]) or: [(digitValue := self nextDigitWithBase: aBase) isNil]]] whileFalse: [ integer ifNil: [integer := 0]. - + maxBaseValue ifNotNil: [ integer > maxBaseValue @@ -201,7 +201,7 @@ XMLIntegerReader >> nextIntegerWithBase: aBase upToLimit: aReadLimit [ integer := integer + digitValue. readLimit ifNotNil: [readLimit := readLimit - 1]]. - ^ integer. + ^ integer ] { #category : #initialization } diff --git a/src/XML-Parser/XMLNode.class.st b/src/XML-Parser/XMLNode.class.st index 0583b103..5578f2af 100644 --- a/src/XML-Parser/XMLNode.class.st +++ b/src/XML-Parser/XMLNode.class.st @@ -44,7 +44,7 @@ XMLNode >> ancestorElementsDo: aBlock [ | ancestor | ancestor := self parent. - [ancestor notNil + [ancestor isNotNil and: [ancestor isElement]] whileTrue: [ aBlock value: ancestor. @@ -66,7 +66,7 @@ XMLNode >> ancestorNodesDo: aBlock [ | ancestor | ancestor := self parent. - [ancestor notNil] + [ancestor isNotNil] whileTrue: [ aBlock value: ancestor. ancestor := ancestor parent]. @@ -209,7 +209,7 @@ XMLNode >> hasNodeList: aNodeList [ XMLNode >> hasParent [ "returns true if the receiver has a parent node" - ^ parent notNil + ^ parent isNotNil ] { #category : #private } @@ -229,7 +229,7 @@ XMLNode >> initializeFileWriteStream: aWriteStream [ aWriteStream streamConverter: - (((document := self document) notNil + (((document := self document) isNotNil and: [document hasEncoding]) ifTrue: [document encoding asXMLStreamConverter] ifFalse: [XMLStreamConverter default]); diff --git a/src/XML-Parser/XMLNodeWithElements.class.st b/src/XML-Parser/XMLNodeWithElements.class.st index 3f278e26..ba5d25c2 100644 --- a/src/XML-Parser/XMLNodeWithElements.class.st +++ b/src/XML-Parser/XMLNodeWithElements.class.st @@ -684,8 +684,8 @@ XMLNodeWithElements >> findElementWithID: anID [ | document doctypeDefinition | - ((document := self document) notNil - and: [(doctypeDefinition := document doctypeDefinition) notNil + ((document := self document) isNotNil + and: [(doctypeDefinition := document doctypeDefinition) isNotNil and: [doctypeDefinition hasAttributeValidators]]) ifTrue: [ self allElementsDo: [:each | diff --git a/src/XML-Parser/XMLParserException.class.st b/src/XML-Parser/XMLParserException.class.st index 6b419b3b..5b9d705d 100644 --- a/src/XML-Parser/XMLParserException.class.st +++ b/src/XML-Parser/XMLParserException.class.st @@ -39,12 +39,12 @@ XMLParserException >> hasBaseURI [ { #category : #testing } XMLParserException >> hasColumnNumber [ - ^ self columnNumber notNil + ^ self columnNumber isNotNil ] { #category : #testing } XMLParserException >> hasLineNumber [ - ^ self lineNumber notNil + ^ self lineNumber isNotNil ] { #category : #testing } diff --git a/src/XML-Parser/XMLParserTokenizer.class.st b/src/XML-Parser/XMLParserTokenizer.class.st index c52bab53..53f6f39e 100644 --- a/src/XML-Parser/XMLParserTokenizer.class.st +++ b/src/XML-Parser/XMLParserTokenizer.class.st @@ -68,7 +68,7 @@ XMLParserTokenizer >> atEnd [ { #category : #decoding } XMLParserTokenizer >> characterFromCodePoint: aCodePoint [ - (aCodePoint notNil + (aCodePoint isNotNil and: [aCodePoint > 0 and: [aCodePoint <= 16r10FFFF]]) ifTrue: [ diff --git a/src/XML-Parser/XMLString.class.st b/src/XML-Parser/XMLString.class.st index 3aa1420c..499be495 100644 --- a/src/XML-Parser/XMLString.class.st +++ b/src/XML-Parser/XMLString.class.st @@ -147,13 +147,13 @@ XMLString >> mergeAdjacent [ siblingNodes := self parent nodes. selfIndex := siblingNodes indexOf: self. - [(adjacentNode := siblingNodes at: selfIndex + 1) notNil + [(adjacentNode := siblingNodes at: selfIndex + 1) isNotNil and: [adjacentNode isStringNode]] whileTrue: [ self append: adjacentNode. siblingNodes removeAt: selfIndex + 1]. - [(adjacentNode := siblingNodes at: selfIndex - 1) notNil + [(adjacentNode := siblingNodes at: selfIndex - 1) isNotNil and: [adjacentNode isStringNode]] whileTrue: [ self prepend: adjacentNode. diff --git a/src/XML-Parser/XMLURI.class.st b/src/XML-Parser/XMLURI.class.st index 289bace4..c178654a 100644 --- a/src/XML-Parser/XMLURI.class.st +++ b/src/XML-Parser/XMLURI.class.st @@ -471,7 +471,7 @@ XMLURI >> hasPath [ { #category : #testing } XMLURI >> hasPort [ - ^ self port notNil + ^ self port isNotNil ] { #category : #testing } diff --git a/src/XML-Parser/XMLUnparsedEntityValidator.class.st b/src/XML-Parser/XMLUnparsedEntityValidator.class.st index 425ed1a6..1391b0a0 100644 --- a/src/XML-Parser/XMLUnparsedEntityValidator.class.st +++ b/src/XML-Parser/XMLUnparsedEntityValidator.class.st @@ -60,7 +60,7 @@ XMLUnparsedEntityValidator >> errorUndeclaredUnparsedEntityReference: anEntity i { #category : #testing } XMLUnparsedEntityValidator >> hasNotationAttributeValidators [ "direct access to avoid lazy initialization" - ^ notationAttributeValidators notNil + ^ notationAttributeValidators isNotNil and: [notationAttributeValidators isNotEmpty] ] diff --git a/src/XML-Parser/XMLWellFormedParserTokenizer.class.st b/src/XML-Parser/XMLWellFormedParserTokenizer.class.st index 3f8a7b06..8c619abe 100644 --- a/src/XML-Parser/XMLWellFormedParserTokenizer.class.st +++ b/src/XML-Parser/XMLWellFormedParserTokenizer.class.st @@ -842,7 +842,7 @@ XMLWellFormedParserTokenizer >> isInExternalSubsetOrExternalEntity [ the document." ^ state isExternalSubsetState - or: [self topPushedBackExternalEntity notNil] + or: [self topPushedBackExternalEntity isNotNil] ] { #category : #accessing } @@ -2382,7 +2382,7 @@ XMLWellFormedParserTokenizer >> nextXMLEncodingAttributeValue [ or: [quote == $']) ifFalse: [self errorExpectedXMLEncodingValueStartButGot: quote]. - ((nextChar := streamReader next) notNil + ((nextChar := streamReader next) isNotNil and: [EncodingNameStartChars includes: nextChar]) ifFalse: [self errorExpectedEncodingName].