On Wed, Jan 25, 2017 at 10:01 AM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 25. Januar 2017 08:31:32 MEZ schrieb pmoua...@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 ?

>
> >-        } 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

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



-- 
Cordialement.
Philippe Mouawad.

Reply via email to