summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-05-03 17:20:12 (EDT)
committer Steffen Pingel2013-05-03 17:20:12 (EDT)
commite0f0d441d846e4c8dec98767bd1a5f584e8e8ceb (patch)
treef866a85a12e75269cfc0203b4c08e411887d6d08
parent2dc5856cb4a08832727818afd88cd809b29ff295 (diff)
downloadorg.eclipse.mylyn.tasks-e0f0d441d846e4c8dec98767bd1a5f584e8e8ceb.zip
org.eclipse.mylyn.tasks-e0f0d441d846e4c8dec98767bd1a5f584e8e8ceb.tar.gz
org.eclipse.mylyn.tasks-e0f0d441d846e4c8dec98767bd1a5f584e8e8ceb.tar.bz2
406959: use SAXParserFactory instead of XMLReaderFactoryrefs/changes/14/12514/1
Change-Id: I025b2878056d4b642936853b588a2ef23a4ffba9 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=406959
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaConfigurationTest.java5
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/XmlExternalizationTest.java6
3 files changed, 7 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
index 1d4868b..972cdb5 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
@@ -20,6 +20,7 @@ import java.io.Reader;
import java.io.StringReader;
import java.security.GeneralSecurityException;
+import org.eclipse.mylyn.commons.core.CoreUtil;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
@@ -27,7 +28,6 @@ import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
/**
* @author Rob Elves
@@ -87,7 +87,7 @@ public class AbstractReportFactory {
}
try {
- final XMLReader reader = XMLReaderFactory.createXMLReader();
+ final XMLReader reader = CoreUtil.newXmlReader();
reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
reader.setContentHandler(contentHandler);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaConfigurationTest.java
index be0e1af..c376637 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaConfigurationTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaConfigurationTest.java
@@ -19,6 +19,7 @@ import java.io.InputStreamReader;
import junit.framework.TestCase;
import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
+import org.eclipse.mylyn.commons.core.CoreUtil;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
@@ -29,7 +30,6 @@ import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
/**
* @author Robert Elves
@@ -126,7 +126,7 @@ public class BugzillaConfigurationTest extends TestCase {
}
SaxConfigurationContentHandler contentHandler = new SaxConfigurationContentHandler();
- final XMLReader reader = XMLReaderFactory.createXMLReader();
+ final XMLReader reader = CoreUtil.newXmlReader();
reader.setContentHandler(contentHandler);
reader.setErrorHandler(new ErrorHandler() {
public void error(SAXParseException exception) throws SAXException {
@@ -154,5 +154,4 @@ public class BugzillaConfigurationTest extends TestCase {
}
}
}
-
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/XmlExternalizationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/XmlExternalizationTest.java
index e588cc9..88e667a 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/XmlExternalizationTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/XmlExternalizationTest.java
@@ -23,6 +23,7 @@ import javax.xml.transform.stream.StreamResult;
import junit.framework.TestCase;
+import org.eclipse.mylyn.commons.core.CoreUtil;
import org.eclipse.mylyn.internal.tasks.core.data.ITaskDataConstants;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
@@ -31,7 +32,6 @@ import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
/**
* @author Steffen Pingel
@@ -95,7 +95,7 @@ public class XmlExternalizationTest extends TestCase {
SimpleCharacterWriter writer = new SimpleCharacterWriter(handler);
writer.write(badChar);
- XMLReader parser = XMLReaderFactory.createXMLReader();
+ XMLReader parser = CoreUtil.newXmlReader();
parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
SimpleCharacterReader readHandler = new SimpleCharacterReader();
parser.setErrorHandler(new ErrorHandler() {
@@ -135,7 +135,7 @@ public class XmlExternalizationTest extends TestCase {
SimpleCharacterWriter writer = new SimpleCharacterWriter(handler);
writer.write(badChar);
- XMLReader parser = XMLReaderFactory.createXMLReader();
+ XMLReader parser = CoreUtil.newXmlReader();
parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
SimpleCharacterReader readHandler = new SimpleCharacterReader();
parser.setErrorHandler(new ErrorHandler() {