jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: svn commit: r1780141 - /jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java
Date Wed, 25 Jan 2017 15:05:45 GMT


Am 25. Januar 2017 13:31:12 MEZ schrieb Philippe Mouawad <philippe.mouawad@gmail.com>:
>On Wed, Jan 25, 2017 at 10:01 AM, Felix Schumacher <
>felix.schumacher@internetallee.de> wrote:
>
>>
>>
>> Am 25. Januar 2017 08:31:32 MEZ schrieb pmouawad@apache.org:
>> >Author: pmouawad
>> >Date: Wed Jan 25 07:31:31 2017
>> >New Revision: 1780141
>> >
>> >URL: http://svn.apache.org/viewvc?rev=1780141&view=rev
>> >Log:
>> >Ignore sonar false positive
>> >
>> >Modified:
>> >jmeter/trunk/src/protocol/java/org/apache/jmeter/
>> protocol/java/config/gui/JavaConfigGui.java
>> >
>> >Modified:
>> >jmeter/trunk/src/protocol/java/org/apache/jmeter/
>> protocol/java/config/gui/JavaConfigGui.java
>> >URL:
>> >http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/
>>
>java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java?rev=
>> 1780141&r1=1780140&r2=1780141&view=diff
>> >===========================================================
>> ===================
>> >---
>> >jmeter/trunk/src/protocol/java/org/apache/jmeter/
>> protocol/java/config/gui/JavaConfigGui.java
>> >(original)
>> >+++
>> >jmeter/trunk/src/protocol/java/org/apache/jmeter/
>> protocol/java/config/gui/JavaConfigGui.java
>> >Wed Jan 25 07:31:31 2017
>> >@@ -266,7 +266,7 @@ public class JavaConfigGui extends Abstr
>> >JavaSamplerClient client = (JavaSamplerClient)
>Class.forName(className,
>> >true,
>> >        
>Thread.currentThread().getContextClassLoader()).newInstance();
>> >             return client != null;
>>
>> Can client be null, or would an exception be thrown?
>>
>No but it is just to cast to JavaSamplerClient (needed) and use the
>local
>variable to avoid another warning.
>Do you have another idea ?

Return true? My comment was about the comparison to null. The cast is obvious and necessary.

>
>>
>> >-        } catch (Exception ex) {
>> >+        } catch (Exception ex) { // NOSONAR We already log this
>>
>> I think sonar complains, as we are loosing the information from the
>> exception here.
>>
>
>
>>
>> Should we log it here and remove the log from the calling function?
>>
>Yes, will fix it this way

Thanks,
Felix

>
>>
>> Felix
>>
>> >             return false;
>> >         }
>> >     }
>>

Mime
View raw message