Author: sebb
Date: Sun Aug 16 01:31:37 2009
New Revision: 804543

URL: http://svn.apache.org/viewvc?rev=804543&view=rev
Log:
The "typing" continues ...

Modified:
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/Arguments.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ListenerNotifier.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/Sample.java
    jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java
    
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/SearchByClass.java
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/ClassContext.java
    
jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/MemoryBenchmark.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLString.java
    
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
 Sun Aug 16 01:31:37 2009
@@ -118,7 +118,7 @@
         }
         UserParameters userParams = ((UserParameters) params);
         userParams.setNames(new CollectionProperty(UserParameters.NAMES, 
tableModel.getColumnData(NAME_COL_RESOURCE)));
-        CollectionProperty threadLists = new 
CollectionProperty(UserParameters.THREAD_VALUES, new ArrayList());
+        CollectionProperty threadLists = new 
CollectionProperty(UserParameters.THREAD_VALUES, new ArrayList<Object>());
         log.debug("making threadlists from gui");
         for (int col = 1; col < tableModel.getColumnCount(); col++) {
             threadLists.addItem(tableModel.getColumnData(getUserColName(col)));

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/Arguments.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/Arguments.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/Arguments.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/Arguments.java Sun 
Aug 16 01:31:37 2009
@@ -40,7 +40,7 @@
      * Create a new Arguments object with no arguments.
      */
     public Arguments() {
-        setProperty(new CollectionProperty(ARGUMENTS, new ArrayList()));
+        setProperty(new CollectionProperty(ARGUMENTS, new 
ArrayList<Argument>()));
     }
 
     /**
@@ -58,7 +58,7 @@
     @Override
     public void clear() {
         super.clear();
-        setProperty(new CollectionProperty(ARGUMENTS, new ArrayList()));
+        setProperty(new CollectionProperty(ARGUMENTS, new 
ArrayList<Argument>()));
     }
 
     /**
@@ -67,7 +67,7 @@
      * @param arguments
      *            the new arguments
      */
-    public void setArguments(List arguments) {
+    public void setArguments(List<Argument> arguments) {
         setProperty(new CollectionProperty(ARGUMENTS, arguments));
     }
 

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java 
Sun Aug 16 01:31:37 2009
@@ -22,6 +22,8 @@
 import java.text.DecimalFormat;
 import java.util.Hashtable;
 import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
 
 import org.apache.jmeter.engine.event.LoopIterationEvent;
 import org.apache.jmeter.engine.util.NoThreadClone;
@@ -88,7 +90,7 @@
      * This map allows summarisers with the same name to contribute to the 
same totals.
      */
     //@GuardedBy("accumulators")
-    private static final Hashtable accumulators = new Hashtable();
+    private static final Hashtable<String, Totals> accumulators = new 
Hashtable<String, Totals>();
     
     //@GuardedBy("accumulators")
     private static int instanceCount; // number of active tests
@@ -263,20 +265,12 @@
         return sb.toString();
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see 
org.apache.jmeter.samplers.SampleListener#sampleStarted(org.apache.jmeter.samplers.SampleEvent)
-     */
+    /** {...@inheritdoc} */
     public void sampleStarted(SampleEvent e) {
         // not used
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see 
org.apache.jmeter.samplers.SampleListener#sampleStopped(org.apache.jmeter.samplers.SampleEvent)
-     */
+    /** {...@inheritdoc} */
     public void sampleStopped(SampleEvent e) {
         // not used
     }
@@ -292,20 +286,12 @@
      */
     
     
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.apache.jmeter.testelement.TestListener#testStarted()
-     */
+    /** {...@inheritdoc} */
     public void testStarted() {
         testStarted("local");
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.apache.jmeter.testelement.TestListener#testEnded()
-     */
+    /** {...@inheritdoc} */
     public void testEnded() {
         testEnded("local");
     }
@@ -323,10 +309,11 @@
      *
      * @see 
org.apache.jmeter.testelement.TestListener#testStarted(java.lang.String)
      */
+    /** {...@inheritdoc} */
     public void testStarted(String host) {
         synchronized (accumulators) {
             myName = getName();
-            myTotals = (Totals) accumulators.get(myName);
+            myTotals = accumulators.get(myName);
             if (myTotals == null){
                 myTotals = new Totals();
                 accumulators.put(myName, myTotals);
@@ -341,22 +328,22 @@
      * So synch is needed to fetch the accumulator, and the myName field will 
already be set up.
      * @see 
org.apache.jmeter.testelement.TestListener#testEnded(java.lang.String)
      */
+    /** {...@inheritdoc} */
     public void testEnded(String host) {
-        Object[] totals = null;
+        Set<Entry<String, Totals>> totals = null;
         synchronized (accumulators) {
             instanceCount--;
             if (instanceCount <= 0){
-                totals = accumulators.entrySet().toArray();                
+                totals = accumulators.entrySet();                
             }
         }
         if (totals == null) {// We're not done yet
             return;
         }
-        for (int i=0; i<totals.length; i++) {
-            Map.Entry me = (Map.Entry)totals[i];
+        for(Map.Entry<String, Totals> entry : totals){
             String str;
-            String name = (String) me.getKey();
-            Totals total = (Totals) me.getValue();
+            String name = entry.getKey();
+            Totals total = entry.getValue();
             // Only print final delta if there were some samples in the delta
             // and there has been at least one sample reported previously
             if (total.delta.getNumSamples() > 0 && total.total.getNumSamples() 
>  0) {
@@ -375,15 +362,11 @@
             }
             if (TOOUT) {
                 System.out.println(str);
-            }
+            }            
         }
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see 
org.apache.jmeter.testelement.TestListener#testIterationStart(org.apache.jmeter.engine.event.LoopIterationEvent)
-     */
+    /** {...@inheritdoc} */
     public void testIterationStart(LoopIterationEvent event) {
         // not used
     }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java 
Sun Aug 16 01:31:37 2009
@@ -63,7 +63,7 @@
 
     //TODO - make "files" and "random" static as the class is a singleton?
 
-    private final Map files = new HashMap();
+    private final Map<String, FileEntry> files = new HashMap<String, 
FileEntry>();
 
     private static final FileServer server = new FileServer();
 
@@ -169,7 +169,7 @@
      * @throws IOException
      */
     public synchronized String readLine(String filename, boolean recycle) 
throws IOException {
-        FileEntry fileEntry = (FileEntry) files.get(filename);
+        FileEntry fileEntry = files.get(filename);
         if (fileEntry != null) {
             if (fileEntry.inputOutputObject == null) {
                 fileEntry.inputOutputObject = createBufferedReader(fileEntry, 
filename);
@@ -204,7 +204,7 @@
     }
 
     public synchronized void write(String filename, String value) throws 
IOException {
-        FileEntry fileEntry = (FileEntry) files.get(filename);
+        FileEntry fileEntry = files.get(filename);
         if (fileEntry != null) {
             if (fileEntry.inputOutputObject == null) {
                 fileEntry.inputOutputObject = createBufferedWriter(fileEntry, 
filename);
@@ -233,10 +233,10 @@
     }
 
     public void closeFiles() throws IOException {
-        Iterator iter = files.entrySet().iterator();
+        Iterator<Map.Entry<String, FileEntry>>  iter = 
files.entrySet().iterator();
         while (iter.hasNext()) {
-            Map.Entry me = (Map.Entry) iter.next();
-            closeFile((String)me.getKey(),(FileEntry)me.getValue() );
+            Map.Entry<String, FileEntry> me = iter.next();
+            closeFile(me.getKey(),me.getValue() );
         }
         files.clear();
     }
@@ -246,7 +246,7 @@
      * @throws IOException
      */
     public synchronized void closeFile(String name) throws IOException {
-        FileEntry fileEntry = (FileEntry) files.get(name);
+        FileEntry fileEntry = files.get(name);
         closeFile(name, fileEntry);
     }
 
@@ -265,9 +265,9 @@
     }
 
     protected boolean filesOpen() {
-        Iterator iter = files.values().iterator();
+        Iterator<FileEntry> iter = files.values().iterator();
         while (iter.hasNext()) {
-            FileEntry fileEntry = (FileEntry) iter.next();
+            FileEntry fileEntry = iter.next();
             if (fileEntry.inputOutputObject != null) {
                 return true;
             }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java 
Sun Aug 16 01:31:37 2009
@@ -79,15 +79,15 @@
     /** The class for which we're providing the bean info. */
     // NOTREAD private Class beanClass;
     /** The BeanInfo for our class as obtained by the introspector. */
-    private BeanInfo rootBeanInfo;
+    private final BeanInfo rootBeanInfo;
 
     /** The icons for this bean. */
-    private Image[] icons = new Image[5];
+    private final Image[] icons = new Image[5];
 
     /**
      * Construct a BeanInfo for the given class.
      */
-    protected BeanInfoSupport(Class beanClass) {
+    protected BeanInfoSupport(Class<?> beanClass) {
         // NOTREAD this.beanClass= beanClass;
 
         try {
@@ -190,41 +190,49 @@
         getBeanDescriptor().setValue(GenericTestBeanCustomizer.ORDER(group), 
new Integer(numCreatedGroups));
     }
 
+    /** {...@inheritdoc} */
     @Override
     public BeanInfo[] getAdditionalBeanInfo() {
         return rootBeanInfo.getAdditionalBeanInfo();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public BeanDescriptor getBeanDescriptor() {
         return rootBeanInfo.getBeanDescriptor();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public int getDefaultEventIndex() {
         return rootBeanInfo.getDefaultEventIndex();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public int getDefaultPropertyIndex() {
         return rootBeanInfo.getDefaultPropertyIndex();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public EventSetDescriptor[] getEventSetDescriptors() {
         return rootBeanInfo.getEventSetDescriptors();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public Image getIcon(int iconKind) {
         return icons[iconKind];
     }
 
+    /** {...@inheritdoc} */
     @Override
     public MethodDescriptor[] getMethodDescriptors() {
         return rootBeanInfo.getMethodDescriptors();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public PropertyDescriptor[] getPropertyDescriptors() {
         return rootBeanInfo.getPropertyDescriptors();

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testbeans/TestBeanHelper.java 
Sun Aug 16 01:31:37 2009
@@ -66,7 +66,7 @@
             for (int x = 0; x < desc.length; x++) {
                 // Obtain a value of the appropriate type for this property.
                 JMeterProperty jprop = el.getProperty(desc[x].getName());
-                Class type = desc[x].getPropertyType();
+                Class<?> type = desc[x].getPropertyType();
                 Object value = Converter.convert(jprop.getStringValue(), type);
 
                 if (log.isDebugEnabled()) {

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
 (original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
 Sun Aug 16 01:31:37 2009
@@ -55,24 +55,17 @@
         }
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see JMeterProperty#isRunningVersion()
-     */
+    /** {...@inheritdoc} */
     public boolean isRunningVersion() {
         return runningVersion;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see JMeterProperty#getName()
-     */
+    /** {...@inheritdoc} */
     public String getName() {
         return name;
     }
 
+    /** {...@inheritdoc} */
     public void setName(String name) {
         if (name == null) {
             throw new IllegalArgumentException("Name cannot be null");
@@ -80,11 +73,7 @@
         this.name = name;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see JMeterProperty#setRunningVersion(boolean)
-     */
+    /** {...@inheritdoc} */
     public void setRunningVersion(boolean runningVersion) {
         this.runningVersion = runningVersion;
     }
@@ -93,11 +82,7 @@
         return new PropertyIteratorImpl(values);
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see Object#clone()
-     */
+    /** {...@inheritdoc} */
     @Override
     public Object clone() {
         try {
@@ -215,6 +200,7 @@
         return s1 == null ? s2 == null : s1.equals(s2);
     }
 
+    /** {...@inheritdoc} */
     @Override
     public int hashCode() {
         int result = 17;
@@ -371,11 +357,11 @@
             return new TestElementProperty(((TestElement) item).getName(),
                     (TestElement) item);
         }
-        if (item instanceof Collection) {
-            return new CollectionProperty("" + item.hashCode(), (Collection) 
item);
+        if (item instanceof Collection<?>) {
+            return new CollectionProperty("" + item.hashCode(), 
(Collection<?>) item);
         }
-        if (item instanceof Map) {
-            return new MapProperty("" + item.hashCode(), (Map) item);
+        if (item instanceof Map<?, ?>) {
+            return new MapProperty("" + item.hashCode(), (Map<?, ?>) item);
         }
         return null;
     }
@@ -401,11 +387,7 @@
         return getStringValue();
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see 
org.apache.jmeter.testelement.property.JMeterProperty#mergeIn(org.apache.jmeter.testelement.property.JMeterProperty)
-     */
+    /** {...@inheritdoc} */
     public void mergeIn(JMeterProperty prop) {
     }
 }

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ListenerNotifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ListenerNotifier.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ListenerNotifier.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ListenerNotifier.java 
Sun Aug 16 01:31:37 2009
@@ -77,11 +77,11 @@
      *            must not be null and must contain only SampleListener
      *            elements.
      */
-    public void notifyListeners(SampleEvent res, List listeners) {
-        Iterator iter = listeners.iterator();
+    public void notifyListeners(SampleEvent res, List<SampleListener> 
listeners) {
+        Iterator<SampleListener> iter = listeners.iterator();
         while (iter.hasNext()) {
             try {
-                SampleListener sampleListener = ((SampleListener) iter.next());
+                SampleListener sampleListener = iter.next();
                 TestBeanHelper.prepare((TestElement) sampleListener);
                 sampleListener.sampleOccurred(res);
             } catch (RuntimeException e) {

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/Sample.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/Sample.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/Sample.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/visualizers/Sample.java Sun 
Aug 16 01:31:37 2009
@@ -22,7 +22,7 @@
 import java.text.Format;
 import java.util.Date;
 
-public class Sample implements Serializable, Comparable {
+public class Sample implements Serializable, Comparable<Sample> {
     private final long data; // = elapsed
 
     private final long average;
@@ -197,13 +197,9 @@
         return throughput;
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    public int compareTo(Object o) {
-        Sample oo = (Sample) o;
+    /** {...@inheritdoc} */
+    public int compareTo(Sample o) {
+        Sample oo = o;
         return ((count - oo.count) < 0 ? -1 : (count == oo.count ? 0 : 1));
     }
 

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java 
(original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/commons/jexl/bsf/JexlEngine.java 
Sun Aug 16 01:31:37 2009
@@ -44,8 +44,11 @@
     
     private JexlContext jc;
 
+    /** {...@inheritdoc} */
+    @SuppressWarnings("unchecked")
     @Override
-    public void initialize(BSFManager mgr, String lang, Vector declaredBeans)
+    public void initialize(BSFManager mgr, String lang, 
+            Vector declaredBeans)
             throws BSFException {
         super.initialize(mgr, lang, declaredBeans);
         jc = JexlHelper.createContext();
@@ -55,6 +58,7 @@
         }
     }
 
+    /** {...@inheritdoc} */
     @Override
     public void terminate() {
         if (jc != null) {
@@ -63,16 +67,20 @@
         }
     }
 
+    /** {...@inheritdoc} */
+    @SuppressWarnings("unchecked")
     @Override
     public void declareBean(BSFDeclaredBean bean) throws BSFException {
         jc.getVars().put(bean.name, bean.bean);
     }
 
+    /** {...@inheritdoc} */
     @Override
     public void undeclareBean(BSFDeclaredBean bean) throws BSFException {
         jc.getVars().remove(bean.name);
     }
 
+    /** {...@inheritdoc} */
     public Object eval(String fileName, int lineNo, int colNo, Object expr)
             throws BSFException {
         if (expr == null) {
@@ -94,6 +102,7 @@
         }
     }
 
+    /** {...@inheritdoc} */
     @Override
     public void exec(String fileName, int lineNo, int colNo, Object script)
             throws BSFException {
@@ -115,16 +124,18 @@
         }
     }
 
+    /** {...@inheritdoc} */
     @Override
     public void iexec(String fileName, int lineNo, int colNo, Object script)
             throws BSFException {
         exec(fileName, lineNo, colNo, script);
     }
 
+    /** {...@inheritdoc} */
     public Object call(Object object, String name, Object[] args)
             throws BSFException {
         try {
-            Class[] types = new Class[args.length];
+            Class<?>[] types = new Class[args.length];
             for (int i = 0; i < args.length; i++) {
                 types[i] = args[i].getClass();
             }

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/SearchByClass.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/SearchByClass.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/SearchByClass.java
 (original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/collections/SearchByClass.java
 Sun Aug 16 01:31:37 2009
@@ -52,17 +52,18 @@
  * @version $Revision$
  */
 public class SearchByClass implements HashTreeTraverser {
-    List<Object> objectsOfClass = new LinkedList<Object>();
+    private final List<Object> objectsOfClass = new LinkedList<Object>();
 
-    Map<Object, ListedHashTree> subTrees = new HashMap<Object, 
ListedHashTree>();
+    private final Map<Object, ListedHashTree> subTrees = new HashMap<Object, 
ListedHashTree>();
 
-    Class<?> searchClass = null;
+    private final Class<?> searchClass;
 
     /**
      * Creates an instance of SearchByClass. However, without setting the Class
      * to search for, it will be a useless object.
      */
     public SearchByClass() {
+        searchClass = null;
     }
 
     /**
@@ -81,7 +82,7 @@
      *
      * @return Collection All found nodes of the requested type
      */
-    public Collection getSearchResults() {
+    public Collection getSearchResults() { // TODO specify collection type 
without breaking callers
         return objectsOfClass;
     }
 
@@ -97,6 +98,7 @@
         return subTrees.get(root);
     }
 
+    /** {...@inheritdoc} */
     public void addNode(Object node, HashTree subTree) {
         if (searchClass.isAssignableFrom(node.getClass())) {
             objectsOfClass.add(node);
@@ -106,9 +108,11 @@
         }
     }
 
+    /** {...@inheritdoc} */
     public void subtractNode() {
     }
 
+    /** {...@inheritdoc} */
     public void processPath() {
     }
 }
\ No newline at end of file

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/ClassContext.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/ClassContext.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/ClassContext.java 
(original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/ClassContext.java 
Sun Aug 16 01:31:37 2009
@@ -44,7 +44,7 @@
      *
      * @return Class[] - list of classes in the callers context
      */
-    public static Class[] getMyClassContext() {
+    public static Class<?>[] getMyClassContext() {
         return _instance.getClassContext();
     }
 

Modified: 
jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/MemoryBenchmark.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/MemoryBenchmark.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/MemoryBenchmark.java
 (original)
+++ 
jakarta/jmeter/trunk/src/monitor/components/org/apache/jmeter/monitor/util/MemoryBenchmark.java
 Sun Aug 16 01:31:37 2009
@@ -27,6 +27,7 @@
  */
 public class MemoryBenchmark {
 
+    @SuppressWarnings("unchecked")
     public static void main(String[] args) {
         if (args.length == 1) {
             int objects = 10000;

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLString.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLString.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLString.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLString.java
 Sun Aug 16 01:31:37 2009
@@ -27,7 +27,7 @@
  *
  * @version $Revision$
  */
-public class URLString implements Comparable {
+public class URLString implements Comparable<URLString> {
 
     private final URL url;
 
@@ -56,6 +56,7 @@
         hashCode = urlAsString.hashCode();
     }
 
+    /** {...@inheritdoc} */
     @Override
     public String toString() {
         return urlAsString;
@@ -65,15 +66,18 @@
         return url;
     }
 
-    public int compareTo(Object o) {
+    /** {...@inheritdoc} */
+    public int compareTo(URLString o) {
         return urlAsString.compareTo(o.toString());
     }
 
+    /** {...@inheritdoc} */
     @Override
     public boolean equals(Object o) {
         return (o instanceof URLString && urlAsString.equals(o.toString()));
     }
 
+    /** {...@inheritdoc} */
     @Override
     public int hashCode() {
         return hashCode;

Modified: 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java?rev=804543&r1=804542&r2=804543&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/test/SleepTest.java
 Sun Aug 16 01:31:37 2009
@@ -195,9 +195,9 @@
      */
     private void listParameters(JavaSamplerContext context) {
         if (getLogger().isDebugEnabled()) {
-            Iterator argsIt = context.getParameterNamesIterator();
+            Iterator<String> argsIt = context.getParameterNamesIterator();
             while (argsIt.hasNext()) {
-                String name = (String) argsIt.next();
+                String name = argsIt.next();
                 getLogger().debug(name + "=" + context.getParameter(name));
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to