This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a74a92  Catch NullPointerException from JSoup when recording a test 
plan
3a74a92 is described below

commit 3a74a92b298b0d32cfc96a689c8fc95125201dde
Author: Felix Schumacher <[email protected]>
AuthorDate: Wed Feb 2 16:56:54 2022 +0100

    Catch NullPointerException from JSoup when recording a test plan
    
    Fix stupid bug, where I placed the declaration of the method
    variable inside the try-catch block.
    
    Bugzilla Id: 65864
---
 .../java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
 
b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
index 43e3395..d577f32 100644
--- 
a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
+++ 
b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
@@ -52,8 +52,9 @@ public class FormCharSetFinder {
             throws HTMLParseException {
         log.debug("Parsing html of: {}", html);
 
+        Document document;
         try {
-            Document document = Jsoup.parse(html);
+            document = Jsoup.parse(html);
         } catch (RuntimeException e) {
             throw new HTMLParseException("Could not parse HTML to look for 
forms charsets", e);
         }

Reply via email to