@@ -387,26 +387,32 @@ public final void setSrcAttribute(final String attribute) {
387387 * {@inheritDoc}
388388 */
389389 @ Override
390- protected void setAttributeNS (final String namespaceURI , final String qualifiedName , String attributeValue ,
390+ protected void setAttributeNS (final String namespaceURI , final String qualifiedName , final String attributeValue ,
391391 final boolean notifyAttributeChangeListeners , final boolean notifyMutationObserver ) {
392392 final String qualifiedNameLC = org .htmlunit .util .StringUtils .toRootLowerCase (qualifiedName );
393+
393394 if (null != attributeValue && SRC_ATTRIBUTE .equals (qualifiedNameLC )) {
394- attributeValue = attributeValue .trim ();
395- }
395+ final String attributeValueTrimmed = attributeValue .trim ();
396396
397- super .setAttributeNS (namespaceURI , qualifiedNameLC , attributeValue , notifyAttributeChangeListeners ,
398- notifyMutationObserver );
397+ super .setAttributeNS (namespaceURI , qualifiedNameLC , attributeValueTrimmed , notifyAttributeChangeListeners ,
398+ notifyMutationObserver );
399399
400- // do not use equals() here
401- // see HTMLIFrameElement2Test.documentCreateElement_onLoad_srcAboutBlank()
402- if (SRC_ATTRIBUTE .equals (qualifiedNameLC ) && UrlUtils .ABOUT_BLANK != attributeValue ) {
403- if (isAttachedToPage ()) {
404- loadSrc ();
405- }
406- else {
407- loadSrcWhenAddedToPage_ = true ;
400+ // do not use equals() here
401+ // see HTMLIFrameElement2Test.documentCreateElement_onLoad_srcAboutBlank()
402+ if (UrlUtils .ABOUT_BLANK != attributeValueTrimmed ) {
403+ if (isAttachedToPage ()) {
404+ loadSrc ();
405+ }
406+ else {
407+ loadSrcWhenAddedToPage_ = true ;
408+ }
408409 }
410+
411+ return ;
409412 }
413+
414+ super .setAttributeNS (namespaceURI , qualifiedNameLC , attributeValue , notifyAttributeChangeListeners ,
415+ notifyMutationObserver );
410416 }
411417
412418 /**
0 commit comments