mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
Replaced StringBuffer with more efficient StringBuilder.
This commit is contained in:
@@ -86,7 +86,7 @@ public class SuppressionHandler extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* The current node text being extracted from the element.
|
* The current node text being extracted from the element.
|
||||||
*/
|
*/
|
||||||
private StringBuffer currentText;
|
private StringBuilder currentText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the start element event.
|
* Handles the start element event.
|
||||||
@@ -100,7 +100,7 @@ public class SuppressionHandler extends DefaultHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||||
currentAttributes = attributes;
|
currentAttributes = attributes;
|
||||||
currentText = new StringBuffer();
|
currentText = new StringBuilder();
|
||||||
if (SUPPRESS.equals(qName)) {
|
if (SUPPRESS.equals(qName)) {
|
||||||
rule = new SuppressionRule();
|
rule = new SuppressionRule();
|
||||||
final String base = currentAttributes.getValue("base");
|
final String base = currentAttributes.getValue("base");
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class PomHandler extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* The current node text being extracted from the element.
|
* The current node text being extracted from the element.
|
||||||
*/
|
*/
|
||||||
private StringBuffer currentText;
|
private StringBuilder currentText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the start element event.
|
* Handles the start element event.
|
||||||
@@ -113,7 +113,7 @@ public class PomHandler extends DefaultHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||||
currentText = new StringBuffer();
|
currentText = new StringBuilder();
|
||||||
stack.push(qName);
|
stack.push(qName);
|
||||||
if (LICENSE.equals(qName)) {
|
if (LICENSE.equals(qName)) {
|
||||||
license = new License();
|
license = new License();
|
||||||
|
|||||||
Reference in New Issue
Block a user