Revision: 17571
          http://sourceforge.net/p/gate/code/17571
Author:   markagreenwood
Date:     2014-03-06 19:01:35 +0000 (Thu, 06 Mar 2014)
Log Message:
-----------
back to the generics tidying

Modified Paths:
--------------
    gate/trunk/src/main/gate/Utils.java
    gate/trunk/src/main/gate/corpora/DocumentImpl.java

Modified: gate/trunk/src/main/gate/Utils.java
===================================================================
--- gate/trunk/src/main/gate/Utils.java 2014-03-06 18:33:35 UTC (rev 17570)
+++ gate/trunk/src/main/gate/Utils.java 2014-03-06 19:01:35 UTC (rev 17571)
@@ -876,7 +876,6 @@
    * @return a String with name prefixes or base URI expanded 
    */
   public static String expandUriString(String toExpand, Map<String,String> 
prefixes ) {
-    String expanded = "";
     // lets see if we have a basename entry in the map
     String baseUri = prefixes.get("");
     // if there is a baseURI and it is the only entry, just prefix toExpand 
with
@@ -1081,6 +1080,7 @@
    * corpus in the parameter list that has a value for that feature.
    *  
    */
+  @SuppressWarnings("unchecked")
   public static String replaceVariablesInString(
           String string, Object... sources)
   {
@@ -1119,7 +1119,7 @@
         for(Object source : sources) {
           if(type.isEmpty()) { // an empty variable type matches only maps 
from the sources
             if(source instanceof Map) {
-              value = ((Map)source).get(varname);
+              value = ((Map<String,?>)source).get(varname);
             }
           } else if(type.equals("pr") && (source instanceof 
ProcessingResource)) {
             value = ((FeatureBearer)source).getFeatures().get(varname);

Modified: gate/trunk/src/main/gate/corpora/DocumentImpl.java
===================================================================
--- gate/trunk/src/main/gate/corpora/DocumentImpl.java  2014-03-06 18:33:35 UTC 
(rev 17570)
+++ gate/trunk/src/main/gate/corpora/DocumentImpl.java  2014-03-06 19:01:35 UTC 
(rev 17571)
@@ -2402,6 +2402,7 @@
   @Override
   public synchronized void removeDocumentListener(DocumentListener l) {
     if(documentListeners != null && documentListeners.contains(l)) {
+      @SuppressWarnings("unchecked")
       Vector<DocumentListener> v = 
(Vector<DocumentListener>)documentListeners.clone();
       v.removeElement(l);
       documentListeners = v;
@@ -2410,6 +2411,7 @@
 
   @Override
   public synchronized void addDocumentListener(DocumentListener l) {
+    @SuppressWarnings("unchecked")
     Vector<DocumentListener> v = documentListeners == null
             ? new Vector<DocumentListener>(2)
             : (Vector<DocumentListener>)documentListeners.clone();

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