Hi, i am currently writing some Samplers for JMeter and realized that the source code in HTTPSampler may throw a NullpointerException in one special case, because there is a logical programming error: Look at the method sample(URL, String, boolean, int) in HTTPSampler: On (my) line 404 you can find the following statement: con = setupConnection(url, method, res); The method used (setupConnection) may throw an IOException. This statement is the first one in the surrounding try block to initialize the HttpURLConnection conn (which is initially set to null). If the setupConnection(...) method now throws the IOException on the first execution, the conn object would still have the null state. Now go to the catch block handling the IOException. There you can see the following code: res.sampleEnd(); conn.disconnect(); <= this is where a NullpointerException may be thrown Naturally its a programming error of mine that the IOException is thrown here, but it is not very useful if the debugging message is supressed, because the NullpointerException is thrown here and no output is generated from the IOException ... That is why I set it to trivial. Would be nice if anyone of you guys could handle it.
Thanks, but this was fixed in 2.3RC3 *** This bug has been marked as a duplicate of 42057 ***
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2023