This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 6f3ae5a0b9f44ac47261cec9bc6962cbdd8c5b34
Author: Josh Tynjala <[email protected]>
AuthorDate: Thu Jun 20 15:21:24 2024 -0700

    add some missing parameters to raw types, or use ? in some cases, where it 
isn't safe, to clear up warnings
---
 .../java/royale/tools/debugger/cli/FileInfoCache.java    |  2 +-
 .../java/flash/localization/LocalizationManager.java     | 16 ++++++++--------
 swfutils/src/main/java/flash/swf/Dictionary.java         |  4 ++--
 swfutils/src/main/java/flash/swf/MovieMetaData.java      |  7 +++----
 swfutils/src/main/java/flash/swf/types/ClipActions.java  |  2 +-
 swfutils/src/main/java/flash/util/IntMap.java            |  6 +++---
 6 files changed, 18 insertions(+), 19 deletions(-)

diff --git 
a/debugger/src/main/java/royale/tools/debugger/cli/FileInfoCache.java 
b/debugger/src/main/java/royale/tools/debugger/cli/FileInfoCache.java
index e66b89aab..a0e7e2599 100644
--- a/debugger/src/main/java/royale/tools/debugger/cli/FileInfoCache.java
+++ b/debugger/src/main/java/royale/tools/debugger/cli/FileInfoCache.java
@@ -118,7 +118,7 @@ public class FileInfoCache implements Comparator<SourceFile>
                Arrays.sort(m_isolateFiles, this);
        }
 
-       public Iterator getAllFiles(int isolateId) {
+       public Iterator<?> getAllFiles(int isolateId) {
                populate();             
                if (isolateId == Isolate.DEFAULT_ID)
                        return m_byInt.iterator();
diff --git a/swfutils/src/main/java/flash/localization/LocalizationManager.java 
b/swfutils/src/main/java/flash/localization/LocalizationManager.java
index 759e19d21..524754157 100644
--- a/swfutils/src/main/java/flash/localization/LocalizationManager.java
+++ b/swfutils/src/main/java/flash/localization/LocalizationManager.java
@@ -42,9 +42,9 @@ public class LocalizationManager
 
     private ILocalizedText getLocalizedTextInner( Locale locale, String id )
     {
-        for (Iterator it = localizers.iterator(); it.hasNext(); )
+        for (Iterator<ILocalizer> it = localizers.iterator(); it.hasNext(); )
         {
-            ILocalizer localizer = (ILocalizer) it.next();
+            ILocalizer localizer = it.next();
 
             ILocalizedText text = localizer.getLocalizedText( locale, id );
 
@@ -74,7 +74,7 @@ public class LocalizationManager
         return t;
     }
 
-    protected static String replaceInlineReferences( String text, Map 
parameters )
+    protected static String replaceInlineReferences( String text, Map<?, ?> 
parameters )
     {
         if (parameters == null)
             return text;
@@ -119,12 +119,12 @@ public class LocalizationManager
                return getLocalizedTextString( id, Collections.EMPTY_MAP );
        }
 
-       public String getLocalizedTextString( String id, Map parameters )
+       public String getLocalizedTextString( String id, Map<?, ?> parameters )
        {
                return getLocalizedTextString(locale, id, parameters );
        }
 
-    public String getLocalizedTextString( Locale locale, String id, Map 
parameters )
+    public String getLocalizedTextString( Locale locale, String id, Map<?, ?> 
parameters )
     {
         ILocalizedText t = getLocalizedText( locale, id );
 
@@ -153,7 +153,7 @@ public class LocalizationManager
         String id = object.getClass().getName().replaceAll( "\\$", "." );
 
         Map<String, Object> parameters = new HashMap<String, Object>();
-        Class c = object.getClass();
+        Class<?> c = object.getClass();
 
         while (c != Object.class)
         {
@@ -205,9 +205,9 @@ public class LocalizationManager
             if (parameters != null)
             {
                 s += "[";
-                for (Iterator it = parameters.entrySet().iterator(); 
it.hasNext(); )
+                for (Iterator<Map.Entry<String, Object>> it = 
parameters.entrySet().iterator(); it.hasNext(); )
                 {
-                    Map.Entry e = (Map.Entry) it.next();
+                    Map.Entry<String, Object> e = it.next();
                     s += e.getKey();
                     if (e.getValue() != null)
                         s += "='" + e.getValue() + "'";
diff --git a/swfutils/src/main/java/flash/swf/Dictionary.java 
b/swfutils/src/main/java/flash/swf/Dictionary.java
index 82553ad94..edee5e7ab 100644
--- a/swfutils/src/main/java/flash/swf/Dictionary.java
+++ b/swfutils/src/main/java/flash/swf/Dictionary.java
@@ -65,10 +65,10 @@ public class Dictionary
                 // When we're decoding, we don't fill in the tags map, and so 
we'll have
                 // to search for the tag to see what it had when we read it in.
 
-                Iterator iterator = ids.entrySet().iterator();
+                Iterator<Entry<Integer, DefineTag>> iterator = 
ids.entrySet().iterator();
                 while (iterator.hasNext())
                 {
-                    Entry entry = (Entry) iterator.next();
+                    Entry<Integer, DefineTag> entry = iterator.next();
 
                     // [ets 1/14/04] we use an exact comparison here instead 
of equals() because this point
                     // should only be reached during *decoding*, by tools that 
want to report the id
diff --git a/swfutils/src/main/java/flash/swf/MovieMetaData.java 
b/swfutils/src/main/java/flash/swf/MovieMetaData.java
index 8067a507e..6eb33edc7 100644
--- a/swfutils/src/main/java/flash/swf/MovieMetaData.java
+++ b/swfutils/src/main/java/flash/swf/MovieMetaData.java
@@ -19,7 +19,6 @@
 
 package flash.swf;
 
-import flash.swf.Dictionary;
 import flash.swf.actions.*;
 import flash.swf.debug.DebugModule;
 import flash.swf.debug.LineRecord;
@@ -141,7 +140,7 @@ public final class MovieMetaData extends TagHandler
                return (String) functionNames.get(offset);
        }
 
-       public Iterator getFunctionLines()
+       public Iterator<Object> getFunctionLines()
        {
                return preciseLines.iterator();
        }
@@ -547,10 +546,10 @@ public final class MovieMetaData extends TagHandler
        {
                if (actions != null)
                {
-                       Iterator it = actions.clipActionRecords.iterator();
+                       Iterator<ClipActionRecord> it = 
actions.clipActionRecords.iterator();
                        while (it.hasNext())
                        {
-                               ClipActionRecord record = (ClipActionRecord) 
it.next();
+                               ClipActionRecord record = it.next();
                                collectActions(record.actionList);
                        }
                }
diff --git a/swfutils/src/main/java/flash/swf/types/ClipActions.java 
b/swfutils/src/main/java/flash/swf/types/ClipActions.java
index 62586716c..23b9359df 100644
--- a/swfutils/src/main/java/flash/swf/types/ClipActions.java
+++ b/swfutils/src/main/java/flash/swf/types/ClipActions.java
@@ -34,7 +34,7 @@ public class ClipActions
     /**
      * Individual event handlers.  List of ClipActionRecord instances.
      */
-       public List clipActionRecords;
+       public List<ClipActionRecord> clipActionRecords;
 
     public boolean equals(Object object)
     {
diff --git a/swfutils/src/main/java/flash/util/IntMap.java 
b/swfutils/src/main/java/flash/util/IntMap.java
index cb6b87827..4ce8efe5e 100644
--- a/swfutils/src/main/java/flash/util/IntMap.java
+++ b/swfutils/src/main/java/flash/util/IntMap.java
@@ -158,9 +158,9 @@ public class IntMap
                return ( (i >= 0) && (i+1 < size) ) ? values[i+1] : null;
        }
 
-    public Iterator iterator()
+    public Iterator<Object> iterator()
     {
-        return new Iterator()
+        return new Iterator<Object>()
         {
             private int i = 0;
             public boolean hasNext()
@@ -175,7 +175,7 @@ public class IntMap
                     throw new NoSuchElementException();
                 }
                 final int j = i++;
-                return new Map.Entry()
+                return new Map.Entry<Object, Object>()
                 {
                     public Object getKey()
                     {

Reply via email to