dion 02/02/06 21:10:34
Modified: latka/src/java/org/apache/commons/latka/xml
SuiteHandler.java
Log:
Fixed formatting
Revision Changes Path
1.15 +51 -53
jakarta-commons/latka/src/java/org/apache/commons/latka/xml/SuiteHandler.java
Index: SuiteHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/xml/SuiteHandler.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- SuiteHandler.java 19 Sep 2001 22:24:40 -0000 1.14
+++ SuiteHandler.java 7 Feb 2002 05:10:34 -0000 1.15
@@ -77,64 +77,62 @@
public class SuiteHandler extends LatkaHandler {
- protected LatkaEventInfo _listener = null;
+ protected LatkaEventInfo _listener = null;
- protected static Category _log =
- Category.getInstance(SuiteHandler.class);
+ protected static Category _log =
+ Category.getInstance(SuiteHandler.class);
- protected Map _sessionCache = new HashMap();
+ protected Map _sessionCache = new HashMap();
- public SuiteHandler(XMLReader reader, LatkaEventInfo listener) {
- super(reader);
- _listener = listener;
- _log.debug("suite handler instantiated");
- }
-
- public void startElement(String uri, String localName,
- String qName, Attributes atts)
- throws SAXException{
-
- if (localName.equals("suite")) {
-
- Properties props = LatkaProperties.getProperties();
-
- String defaultHost = atts.getValue("defaultHost");
- if (defaultHost != null) {
- props.setProperty("latka.defaultHost",defaultHost);
- } else {
- // clear this property, so that its value is not
- // leaked from a previous invocation
- props.remove("latka.defaultHost");
- }
-
- String portString = atts.getValue("defaultPort");
- if (portString != null) {
- props.setProperty("latka.defaultPort",portString);
- } else {
- props.remove("latka.defaultPort");
- }
-
- } else if (localName.equals("session")) {
-
- SessionHandler handler = new SessionHandler(_reader, _listener,
- _sessionCache);
- handler.delegate(uri,localName,qName,atts);
-
- } else if (localName.equals("request")) {
- // implicit session
- SessionImpl session = new SessionImpl();
- RequestHandler handler =
- new RequestHandler(_reader,session,_listener);
- handler.delegate(uri,localName,qName,atts);
+ public SuiteHandler(XMLReader reader, LatkaEventInfo listener) {
+ super(reader);
+ _listener = listener;
+ _log.debug("suite handler instantiated");
}
- }
- public void endElement(String namespaceURI, String localName,
- String rawName)
- throws SAXException {
- if (localName.equals("suite")) {
- _listener.suiteCompleted(new SuiteCompletedEvent());
+ public void startElement(String uri, String localName, String qName,
+ Attributes atts) throws SAXException{
+
+ if (localName.equals("suite")) {
+
+ Properties props = LatkaProperties.getProperties();
+
+ String defaultHost = atts.getValue("defaultHost");
+ if (defaultHost != null) {
+ props.setProperty("latka.defaultHost", defaultHost);
+ } else {
+ // clear this property, so that its value is not
+ // leaked from a previous invocation
+ props.remove("latka.defaultHost");
+ }
+
+ String portString = atts.getValue("defaultPort");
+ if (portString != null) {
+ props.setProperty("latka.defaultPort", portString);
+ } else {
+ props.remove("latka.defaultPort");
+ }
+
+ } else if (localName.equals("session")) {
+
+ SessionHandler handler = new SessionHandler(_reader, _listener,
+ _sessionCache);
+ handler.delegate(uri, localName, qName, atts);
+
+ } else if (localName.equals("request")) {
+ // implicit session
+ SessionImpl session = new SessionImpl();
+ RequestHandler handler =
+ new RequestHandler(_reader, session, _listener);
+ handler.delegate(uri, localName, qName, atts);
+ }
+ }
+
+ public void endElement(String namespaceURI, String localName,
+ String rawName) throws SAXException {
+ if (localName.equals("suite")) {
+ _listener.suiteCompleted(new SuiteCompletedEvent());
+ }
}
- }
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>