Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 39615 Details for
Bug 136219
convert bug parser to use xml and rdf sources
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Missed file with error handler.
patch136219-6.txt (text/plain), 3.95 KB, created by
Robert Elves
on 2006-04-26 20:33:31 EDT
(
hide
)
Description:
Missed file with error handler.
Filename:
MIME Type:
Creator:
Robert Elves
Created:
2006-04-26 20:33:31 EDT
Size:
3.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylar.bugzilla.core >Index: src/org/eclipse/mylar/internal/bugzilla/core/internal/ServerConfigurationFactory.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.mylar/org.eclipse.mylar.bugzilla.core/src/org/eclipse/mylar/internal/bugzilla/core/internal/ServerConfigurationFactory.java,v >retrieving revision 1.1 >diff -u -r1.1 ServerConfigurationFactory.java >--- src/org/eclipse/mylar/internal/bugzilla/core/internal/ServerConfigurationFactory.java 25 Apr 2006 01:40:50 -0000 1.1 >+++ src/org/eclipse/mylar/internal/bugzilla/core/internal/ServerConfigurationFactory.java 27 Apr 2006 00:19:50 -0000 >@@ -18,8 +18,11 @@ > import java.net.URL; > import java.net.URLConnection; > >+import org.eclipse.mylar.internal.core.util.MylarStatusHandler; >+import org.xml.sax.ErrorHandler; > 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; > >@@ -28,7 +31,7 @@ > * > * @author Rob Elves > */ >-public class ServerConfigurationFactory { >+public class ServerConfigurationFactory { > > private static final String CONFIG_RDF_URL = "/config.cgi?ctype=rdf"; > >@@ -45,31 +48,6 @@ > return instance; > } > >- // public ProductConfiguration getConfiguration(String server) throws >- // IOException { >- // URL serverURL = new URL(server + "/config.cgi?ctype=rdf"); >- // URLConnection c = serverURL.openConnection(); >- // BufferedReader in = new BufferedReader(new >- // InputStreamReader(c.getInputStream())); >- // Document document; >- // DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); >- // factory.setValidating(false); >- // factory.setNamespaceAware(false); >- // try { >- // DocumentBuilder builder = factory.newDocumentBuilder(); >- // document = builder.parse( new InputSource(in) ); >- // >- // } catch (SAXParseException spe) { >- // System.err.println("Sax parse exception!"); >- // } catch (ParserConfigurationException e) { >- // e.printStackTrace(); >- // } catch (SAXException e) { >- // e.printStackTrace(); >- // } >- // return null; >- // >- // } >- > public RepositoryConfiguration getConfiguration(String server) throws IOException { > URL serverURL = new URL(server + CONFIG_RDF_URL); > URLConnection c = serverURL.openConnection(); >@@ -81,7 +59,7 @@ > StringBuffer result = XmlCleaner.clean(in); > StringReader strReader = new StringReader(result.toString()); > XMLReader reader = XMLReaderFactory.createXMLReader(); >- // reader.setErrorHandler(new SaxErrorHandler()) >+ reader.setErrorHandler(new SaxErrorHandler()); > reader.setContentHandler(contentHandler); > reader.parse(new InputSource(strReader)); > } catch (SAXException e) { >@@ -91,26 +69,21 @@ > > } > >- // class SaxErrorHandler implements ErrorHandler { >- // >- // public void error(SAXParseException exception) throws SAXException { >- // System.err.println("Error: >- // "+exception.getLineNumber()+"\n"+exception.getLocalizedMessage()); >- // >- // } >- // >- // public void fatalError(SAXParseException exception) throws SAXException { >- // System.err.println("Fatal Error: >- // "+exception.getLineNumber()+"\n"+exception.getLocalizedMessage()); >- // >- // } >- // >- // public void warning(SAXParseException exception) throws SAXException { >- // System.err.println("Warning: >- // "+exception.getLineNumber()+"\n"+exception.getLocalizedMessage()); >- // >- // } >- // >- // } >+ class SaxErrorHandler implements ErrorHandler { >+ >+ public void error(SAXParseException exception) throws SAXException { >+ MylarStatusHandler.fail(exception, "ServerConfigurationFactory: " + exception.getLocalizedMessage(), false); >+ } >+ >+ public void fatalError(SAXParseException exception) throws SAXException { >+ MylarStatusHandler.fail(exception, "ServerConfigurationFactory: " + exception.getLocalizedMessage(), false); >+ >+ } >+ >+ public void warning(SAXParseException exception) throws SAXException { >+ // ignore >+ } >+ >+ } > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136219
:
39378
|
39381
|
39429
|
39484
|
39498
|
39599
| 39615 |
39833
|
39835
|
40093
|
40670
|
40671