Hello,
This patch fixes the remaining warnings reported in Eclipse 2.1. Most were due to calls to static methods through an instance variable. Fixing this uncovered one actual bug: in AllTests it was setting up a FileOutputStream in an instance of TestRunner, but then started the test through a static method, so the FileOutputStream was ignored. This means that "build tests" will now stick the results in testresults.txt instead of System.out.


One other warning also uncovered a bug: in the TextAreaTableCellEditor constructor there was an initialization "this.col = col" which should have been "this.col = column" -- the original code was just assigning the variable to itself.

Jeremy

Index: src/core/org/apache/jmeter/gui/util/TextAreaTableCellEditor.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/TextAreaTableCellEditor.java,v
retrieving revision 1.2
diff -u -r1.2 TextAreaTableCellEditor.java
--- src/core/org/apache/jmeter/gui/util/TextAreaTableCellEditor.java    14 Aug 2002 
02:52:18 -0000      1.2
+++ src/core/org/apache/jmeter/gui/util/TextAreaTableCellEditor.java    30 Mar 2003 
15:15:28 -0000
@@ -44,7 +44,7 @@
                        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        pane.validate();
        this.row = row;
-       this.col = col;
+       this.col = column;
        return pane;
     }
     
Index: src/core/org/apache/jmeter/util/JMeterUtils.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java,v
retrieving revision 1.19
diff -u -r1.19 JMeterUtils.java
--- src/core/org/apache/jmeter/util/JMeterUtils.java    25 Mar 2003 17:24:35 -0000     
 1.19
+++ src/core/org/apache/jmeter/util/JMeterUtils.java    30 Mar 2003 15:15:30 -0000
@@ -163,9 +163,8 @@
                {
                        try
                        {
-                               p.load(
-                                       
JMeterUtils.class.getClassLoader().getSystemResourceAsStream(
-                                               
"org/apache/jmeter/jmeter.properties"));
+                p.load(ClassLoader.getSystemResourceAsStream(
+                            "org/apache/jmeter/jmeter.properties"));
                        }
                        catch (IOException ex)
                        {
Index: src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java,v
retrieving revision 1.1
diff -u -r1.1 ListedHashTree.java
--- src/jorphan/org/apache/jorphan/collections/ListedHashTree.java      17 Oct 2002 
19:47:18 -0000      1.1
+++ src/jorphan/org/apache/jorphan/collections/ListedHashTree.java      30 Mar 2003 
15:15:31 -0000
@@ -292,7 +292,7 @@
                        assertEquals(1,tree.getTree("key").list().size());
                        assertEquals(0,tree.getTree("key").getTree("value").size());
                        assertEquals(tree.getTree("key").getArray()[0], "value");
-                       this.assertNotNull(tree.getTree("key").get("value"));
+                       assertNotNull(tree.getTree("key").get("value"));
                }
        }
 
Index: src/jorphan/org/apache/jorphan/test/AllTests.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/jorphan/org/apache/jorphan/test/AllTests.java,v
retrieving revision 1.2
diff -u -r1.2 AllTests.java
--- src/jorphan/org/apache/jorphan/test/AllTests.java   27 Dec 2002 15:51:18 -0000     
 1.2
+++ src/jorphan/org/apache/jorphan/test/AllTests.java   30 Mar 2003 15:15:31 -0000
@@ -152,7 +152,7 @@
                        TestSuite suite = suite(args[0]);
                        PrintStream out = new PrintStream(new 
FileOutputStream("testresults.txt"));
                        junit.textui.TestRunner runner = new 
junit.textui.TestRunner(out);
-                       runner.run(suite);
+                       runner.doRun(suite, false);
                        out.close();
                }
                catch (FileNotFoundException e)
Index: 
src/protocol/http/org/apache/jmeter/junit/protocol/http/config/UrlConfigTest.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/protocol/http/org/apache/jmeter/junit/protocol/http/config/UrlConfigTest.java,v
retrieving revision 1.1
diff -u -r1.1 UrlConfigTest.java
--- src/protocol/http/org/apache/jmeter/junit/protocol/http/config/UrlConfigTest.java  
 11 Aug 2002 19:24:50 -0000      1.1
+++ src/protocol/http/org/apache/jmeter/junit/protocol/http/config/UrlConfigTest.java  
 30 Mar 2003 15:15:32 -0000
@@ -220,7 +220,7 @@
 
        public void testOverRide()
        {
-               this.assertNull(partialConfig.getProperty(HTTPSampler.DOMAIN));
+               assertNull(partialConfig.getProperty(HTTPSampler.DOMAIN));
                partialConfig.addTestElement(defaultConfig);
                
assertEquals(partialConfig.getProperty(HTTPSampler.DOMAIN),"www.xerox.com");
                assertEquals(partialConfig.getProperty(HTTPSampler.PATH),"main.jsp");
Index: 
src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java,v
retrieving revision 1.1
diff -u -r1.1 HtmlParserTester.java
--- 
src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java   
     11 Aug 2002 19:24:50 -0000      1.1
+++ 
src/protocol/http/org/apache/jmeter/junit/protocol/http/parser/HtmlParserTester.java   
     30 Mar 2003 15:15:32 -0000
@@ -157,7 +157,7 @@
                result.setSamplerData(context);
                parser.modifyEntry(config, result);
                String newUrl = config.getUrl().toString();
-               
this.assertTrue(!"http://www.apache.org:80/home/index.html?param1=value1".equals(newUrl));
+               
assertTrue(!"http://www.apache.org:80/home/index.html?param1=value1".equals(newUrl));
                assertEquals(config.getUrl().toString(),newUrl);
        }
 
@@ -225,7 +225,7 @@
        {
                HTTPSampler config = new HTTPSampler();
                config.setDomain("www.apache.org");
-               config.setMethod(config.GET);
+               config.setMethod(HTTPSampler.GET);
                config.setPath(path);
                config.setPort(80);
                config.setProtocol("http");
Index: src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParser.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParser.java,v
retrieving revision 1.5
diff -u -r1.5 HtmlParser.java
--- src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParser.java    31 Jan 
2003 18:25:10 -0000      1.5
+++ src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParser.java    30 Mar 
2003 15:15:33 -0000
@@ -300,7 +300,7 @@
         ***************************************/
        public static Document createEmptyDoc()
        {
-               return new Tidy().createEmptyDocument();
+               return Tidy.createEmptyDocument();
        }
 
        /****************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to