Am 25. Januar 2017 08:31:32 MEZ schrieb [email protected]:
>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?
>- } 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?
Felix
> return false;
> }
> }