This is an automated email from the ASF dual-hosted git repository. bwalker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new eb38d73 Fix the wrong use of Enumeration interface (#3637) eb38d73 is described below commit eb38d73be8504666fcaea767dbc2ea70916a35e0 Author: Brad Walker <bwal...@musings.com> AuthorDate: Sat Feb 19 02:27:47 2022 -0500 Fix the wrong use of Enumeration interface (#3637) This is the wrong use of the Enumeration interface.. [repeat] /home/bwalker/src/netbeans/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FindComponentModules.java:204: warning: [rawtypes] found raw type: Enumeration [repeat] Enumeration en = new StringTokenizer (value, ","); // NOI18N [repeat] ^ [repeat] missing type arguments for generic class Enumeration<E> [repeat] where E is a type-variable: [repeat] E extends Object declared in interface Enumeration --- .../modules/ide/ergonomics/fod/FindComponentModules.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FindComponentModules.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FindComponentModules.java index d1a9fca..1166e9b 100644 --- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FindComponentModules.java +++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FindComponentModules.java @@ -26,7 +26,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Deque; -import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; @@ -201,10 +200,10 @@ public final class FindComponentModules extends Task { Preferences pref = FindComponentModules.getPreferences (); String value = pref.get (ENABLE_LATER, null); if (value != null && value.trim ().length () > 0) { - Enumeration en = new StringTokenizer (value, ","); // NOI18N - while (en.hasMoreElements ()) { - String codeName = ((String) en.nextElement ()).trim (); - UpdateElement el = findUpdateElement (codeName, true); + StringTokenizer st = new StringTokenizer (value, ","); // NOI18N + while (st.hasMoreElements ()) { + String codeName = st.nextToken().trim(); + UpdateElement el = findUpdateElement(codeName, true); if (el != null) { res.add (el); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists