Revision: 17578
          http://sourceforge.net/p/gate/code/17578
Author:   markagreenwood
Date:     2014-03-07 15:45:51 +0000 (Fri, 07 Mar 2014)
Log Message:
-----------
a tiny bit more generics stuff

Modified Paths:
--------------
    gate/trunk/src/main/gate/config/ConfigXmlHandler.java

Modified: gate/trunk/src/main/gate/config/ConfigXmlHandler.java
===================================================================
--- gate/trunk/src/main/gate/config/ConfigXmlHandler.java       2014-03-07 
14:40:34 UTC (rev 17577)
+++ gate/trunk/src/main/gate/config/ConfigXmlHandler.java       2014-03-07 
15:45:51 UTC (rev 17578)
@@ -39,7 +39,7 @@
    *  onto it. Probably. Ok, so I should check, but a) it works, b)
    *  I'm bald already and c) life is short.)
    */
-  private Stack contentStack = new Stack();
+  private Stack<String> contentStack = new Stack<String>();
 
   /** The current resource data object */
   private SystemData systemData;
@@ -91,7 +91,7 @@
       StringBuffer errorMessage =
         new StringBuffer("document ended but element stack not empty:");
       while(! contentStack.isEmpty())
-        errorMessage.append(Strings.getNl()+"  "+(String) contentStack.pop());
+        errorMessage.append(Strings.getNl()+"  "+contentStack.pop());
       throw new GateSaxException(errorMessage.toString());
     }
   } // endDocument
@@ -179,7 +179,7 @@
 
     //////////////////////////////////////////////////////////////////
     } else if(elementName.toUpperCase().equals("CREOLE-DIRECTORY")) {
-      String dirUrlName = (String) contentStack.pop();
+      String dirUrlName = contentStack.pop();
       try {
         register.registerDirectories(new URL(dirUrlName));
       } catch(MalformedURLException e) {
@@ -195,17 +195,17 @@
 
     //////////////////////////////////////////////////////////////////
     } else if(elementName.toUpperCase().equals("CONTROLLER")) {
-      systemData.controllerTypeName = (String) contentStack.pop();
+      systemData.controllerTypeName = contentStack.pop();
 
     //////////////////////////////////////////////////////////////////
     } else if(elementName.toUpperCase().equals("LR")) {
       // create an LR and add it to the SystemData
-      createResource((String) contentStack.pop(), systemData.lrList);
+      createResource(contentStack.pop(), systemData.lrList);
 
     //////////////////////////////////////////////////////////////////
     } else if(elementName.toUpperCase().equals("PR")) {
       // create a PR and add it to the SystemData
-      createResource((String) contentStack.pop(), systemData.prList);
+      createResource(contentStack.pop(), systemData.prList);
 
     //////////////////////////////////////////////////////////////////
     } else if(elementName.toUpperCase().equals("DBCONFIG")) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to