この規則は、XML の構文解析で WebLogic setAttribute および getAttribute 属性が使用されている場合にそれを検出します。 この規則は、Java コードを検出します。別の規則は、WebLogic weblogic.servlet.XMLParsingHelper が使用されている場合にそれを検出します。 これにより、以下のフィーチャーが使用可能になります。
例:
request.setAttribute("org.xml.sax.helpers.DefaultHandler", someObject)
例:
String handler = "org.xml.sax.helpers.DefaultHandler";
request.setAttribute(handler, someObject);
例: Document myDocument = request.getAttribute("org.w3c.dom.Document")
例:
String handler = "org.w3c.dom.Document";
Document myDoc = request.getAttribute(handler);
例:
request.setAttribute("org.xml.sax.helpers.DefaultHandler", myHandler);
request.getAttribute("org.w3c.dom.Document");
自動修正が前の行に適用されると、その行は削除される。
注: オブジェクトが以下のことを確認してください。
myHandler
後でコード内で使用される場合は、他の方法で初期化されます。
例:
Document myDocument = request.getAttribute("org.w3c.dom.Document");
自動修正が適用されると、以前のコードは次のように変更される:
Document myDocument;
注: オブジェクトが以下のことを確認してください。
myDocument
後でコード内で使用される場合は、他の方法で初期化されます。