Author: sebb Date: Sun Aug 16 14:10:49 2009 New Revision: 804696 URL: http://svn.apache.org/viewvc?rev=804696&view=rev Log: The "typing" continues ...
Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorGraph.java jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorHealthPanel.java jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java jakarta/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportCopy.java jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/JTLData.java Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java (original) +++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java Sun Aug 16 14:10:49 2009 @@ -81,6 +81,7 @@ return res; } + @SuppressWarnings("unchecked") private void formatSet(StringBuffer sb, Set s) { ArrayList<Map.Entry<Object, Object>> al = new ArrayList<Map.Entry<Object, Object>>(s); Collections.sort(al, new Comparator<Map.Entry<Object, Object>>(){ Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java Sun Aug 16 14:10:49 2009 @@ -50,11 +50,11 @@ private List<PreProcessor> preProcessors = new LinkedList<PreProcessor>(); // TODO the following lists don't seem to be used at present - private List responseModifiers; + private List<?> responseModifiers; private List<ConfigTestElement> configs; - private List modifiers; + private List<?> modifiers; private List<TestElement> controllers; @@ -65,8 +65,8 @@ public SamplePackage( List<ConfigTestElement> configs, - List modifiers, - List responseModifiers, + List<?> modifiers, + List<?> responseModifiers, List<SampleListener> listeners, List<Timer> timers, List<Assertion> assertions, @@ -100,6 +100,7 @@ // TODO: Unfortunately, few of the test element interfaces implement TestElement // (though all the implementation classes do) + @SuppressWarnings("unchecked") private void setRunningVersion(List<?> list, boolean running) { Iterator<TestElement> iter = (Iterator<TestElement>) list.iterator(); while (iter.hasNext()) { @@ -107,6 +108,7 @@ } } + @SuppressWarnings("unchecked") private void recoverRunningVersion(List<?> list) { Iterator<TestElement> iter = (Iterator<TestElement>) list.iterator(); while (iter.hasNext()) { @@ -200,14 +202,14 @@ /** * Returns the modifiers. */ - public List getModifiers() { + public List<?> getModifiers() { return modifiers; } /** * Returns the responseModifiers. */ - public List getResponseModifiers() { + public List<?> getResponseModifiers() { return responseModifiers; } @@ -237,7 +239,7 @@ * @param modifiers * the modifiers to set */ - public void setModifiers(List modifiers) { + public void setModifiers(List<?> modifiers) { this.modifiers = modifiers; } @@ -257,7 +259,7 @@ * @param responseModifiers * the responseModifiers to set */ - public void setResponseModifiers(List responseModifiers) { + public void setResponseModifiers(List<?> responseModifiers) { this.responseModifiers = responseModifiers; } Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java (original) +++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java Sun Aug 16 14:10:49 2009 @@ -40,7 +40,7 @@ * @param toType * @return Object */ - public static Object convert(Object value, Class toType) { + public static Object convert(Object value, Class<?> toType) { if (value == null) { value = ""; } else if (toType.isAssignableFrom(value.getClass())) { Modified: jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorGraph.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorGraph.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorGraph.java (original) +++ jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorGraph.java Sun Aug 16 14:10:49 2009 @@ -100,10 +100,10 @@ super.paintComponent(g); if (this.current != null) { synchronized (model) { - List samples = model.getAllSamples(this.current.getURL()); + List<MonitorModel> samples = model.getAllSamples(this.current.getURL()); int size = samples.size(); synchronized (samples) { - Iterator e; + Iterator<MonitorModel> e; if (size > getWidth()) { e = samples.listIterator(size - getWidth()); } else { @@ -111,7 +111,7 @@ } MonitorModel last = null; for (int i = 0; e.hasNext(); i++) { - MonitorModel s = (MonitorModel) e.next(); + MonitorModel s = e.next(); if (last == null) { last = s; } Modified: jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorHealthPanel.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorHealthPanel.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorHealthPanel.java (original) +++ jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorHealthPanel.java Sun Aug 16 14:10:49 2009 @@ -36,7 +36,7 @@ * only uses the most current information to show the status. */ public class MonitorHealthPanel extends JPanel implements MonitorListener, Clearable { - private final HashMap/*<String, ServerPanel>*/ serverPanelMap = new HashMap/*<String, ServerPanel>*/(); + private final HashMap<String, ServerPanel> serverPanelMap = new HashMap<String, ServerPanel>(); private JPanel servers = null; @@ -115,7 +115,7 @@ if (serverPanelMap.containsKey(model.getURL())) { ServerPanel pane = null; if (serverPanelMap.get(model.getURL()) != null) { - pane = (ServerPanel) serverPanelMap.get((model.getURL())); + pane = serverPanelMap.get((model.getURL())); } else { pane = new ServerPanel(model); serverPanelMap.put(model.getURL(), pane); Modified: jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java (original) +++ jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java Sun Aug 16 14:10:49 2009 @@ -49,13 +49,13 @@ private DefaultTreeModel TREEMODEL; - private MonitorGraph GRAPH; + private final MonitorGraph GRAPH; private DefaultMutableTreeNode ROOTNODE; - private HashMap SERVERMAP; + private final HashMap<String, DefaultMutableTreeNode> SERVERMAP; - private MonitorAccumModel MODEL; + private final MonitorAccumModel MODEL; private SampleResult ROOTSAMPLE; @@ -103,6 +103,9 @@ @Deprecated public MonitorPerformancePanel() { // log.warn("Only for use in unit testing"); + SERVERMAP = null; + MODEL = null; + GRAPH = null; } /** @@ -110,7 +113,7 @@ */ public MonitorPerformancePanel(MonitorAccumModel model, MonitorGraph graph) { super(); - this.SERVERMAP = new HashMap(); + this.SERVERMAP = new HashMap<String, DefaultMutableTreeNode>(); this.MODEL = model; this.MODEL.addListener(this); this.GRAPH = graph; Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java Sun Aug 16 14:10:49 2009 @@ -28,7 +28,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import java.util.Collection; import java.util.NoSuchElementException; import java.util.StringTokenizer; @@ -79,14 +78,14 @@ * Default Constructor. */ public AuthManager() { - setProperty(new CollectionProperty(AUTH_LIST, new ArrayList())); + setProperty(new CollectionProperty(AUTH_LIST, new ArrayList<Object>())); } /** {...@inheritdoc} */ @Override public void clear() { super.clear(); - setProperty(new CollectionProperty(AUTH_LIST, new ArrayList())); + setProperty(new CollectionProperty(AUTH_LIST, new ArrayList<Object>())); } /** @@ -129,10 +128,6 @@ return org.apache.jmeter.protocol.http.gui.AuthPanel.class; } - public Collection getAddList() { - return null; - } - /** * Return the record at index i */ Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java Sun Aug 16 14:10:49 2009 @@ -54,7 +54,7 @@ * @param pageEncoding the encoding used for the whole page * @throws HTMLParseException */ - public void addFormActionsAndCharSet(String html, Map formEncodings, String pageEncoding) + public void addFormActionsAndCharSet(String html, Map<String, String> formEncodings, String pageEncoding) throws HTMLParseException { if (log.isDebugEnabled()) { log.debug("Parsing html of: " + html); @@ -85,7 +85,7 @@ * @param formEncodings the Map where we should add form encodings found * @param pageEncoding the encoding used for the page where the nodes are present */ - private void parseNodes(final NodeIterator e, Map formEncodings, String pageEncoding) + private void parseNodes(final NodeIterator e, Map<String, String> formEncodings, String pageEncoding) throws HTMLParseException, ParserException { while(e.hasMoreNodes()) { Node node = e.nextNode(); Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java Sun Aug 16 14:10:49 2009 @@ -40,7 +40,7 @@ * Create a new HTTPFileArgs object with no files. */ public HTTPFileArgs() { - setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList())); + setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList<HTTPFileArg>())); } /** @@ -58,7 +58,7 @@ @Override public void clear() { super.clear(); - setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList())); + setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList<HTTPFileArg>())); } /** @@ -66,7 +66,7 @@ * * @param files the new files */ - public void setHTTPFileArgs(List files) { + public void setHTTPFileArgs(List<HTTPFileArg> files) { setProperty(new CollectionProperty(HTTP_FILE_ARGS, files)); } Modified: jakarta/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportCopy.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportCopy.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportCopy.java (original) +++ jakarta/jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportCopy.java Sun Aug 16 14:10:49 2009 @@ -100,9 +100,9 @@ } private static void cloneChildren(ReportTreeNode to, ReportTreeNode from) { - Enumeration enumFrom = from.children(); + Enumeration<ReportTreeNode> enumFrom = from.children(); while (enumFrom.hasMoreElements()) { - ReportTreeNode child = (ReportTreeNode) enumFrom.nextElement(); + ReportTreeNode child = enumFrom.nextElement(); ReportTreeNode childClone = (ReportTreeNode) child.clone(); childClone.setUserObject(((TestElement) child.getUserObject()) .clone()); Modified: jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/JTLData.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/JTLData.java?rev=804696&r1=804695&r2=804696&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/JTLData.java (original) +++ jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/JTLData.java Sun Aug 16 14:10:49 2009 @@ -79,6 +79,7 @@ * @param urls * @return array list of non-null entries (may be empty) */ + @SuppressWarnings("unchecked") // Method is broken anyway public List getStats(List urls) { ArrayList items = new ArrayList(); Iterator itr = urls.iterator(); --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org