Bug 57394 - ClassTools#construct(String, int) ignores second parameter
Summary: ClassTools#construct(String, int) ignores second parameter
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.12
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-23 15:15 UTC by Felix Schumacher
Modified: 2014-12-23 16:25 UTC (History)
0 users



Attachments
use the int parameter for the constructor (1.62 KB, patch)
2014-12-23 15:15 UTC, Felix Schumacher
Details | Diff
use the int parameter for the constructor and add test cases (5.38 KB, patch)
2014-12-23 16:18 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schumacher 2014-12-23 15:15:42 UTC
Created attachment 32326 [details]
use the int parameter for the constructor

In ClassTools#construct(String, int) the second parameter should be used for constructing an object, but it is ignored.
Comment 1 Felix Schumacher 2014-12-23 16:18:11 UTC
Created attachment 32327 [details]
use the int parameter for the constructor and add test cases
Comment 2 Felix Schumacher 2014-12-23 16:25:18 UTC
Date: Tue Dec 23 16:23:16 2014
New Revision: 1647607

URL: http://svn.apache.org/r1647607
Log:
Bug 57394: When constructing an instance using ClassTools#construct(String, int),
the int parameter was not used, but the default constructor was used instead.

Added a few test cases to test the methods of ClassTools and correct the unused parameter.

The only place in jmeter, where this method was called is in the JMeter class itself and
is used, when the property "mirror.server.port" is set to a value greater than zero. 
Without this patch that value would be ignored.

Bugzilla Id: 57394


Added:
    jmeter/trunk/test/src/org/apache/jorphan/reflect/TestClassTools.java
Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassTools.java
    jmeter/trunk/xdocs/changes.xml