Author: agomes Date: Wed Dec 6 22:21:19 2017 New Revision: 1817321 URL: http://svn.apache.org/viewvc?rev=1817321&view=rev Log: This closes #345 - Updated to latest checkstyle (v8.5), Added many more rules to checkstyle, Included checking of test files and more file types. Contributed by Graham Russell
Modified: jmeter/trunk/build.properties jmeter/trunk/build.xml jmeter/trunk/checkstyle-suppressions.xml jmeter/trunk/checkstyle.xml jmeter/trunk/docs/images/screenshots/Proxy_Run.png jmeter/trunk/docs/images/screenshots/Select-Templates-Icon.png jmeter/trunk/docs/images/screenshots/Test_Generated.png jmeter/trunk/docs/images/screenshots/Validate-Test-Plan.png jmeter/trunk/docs/images/screenshots/example-recording.png jmeter/trunk/docs/images/screenshots/example-thread-group.png jmeter/trunk/docs/images/screenshots/http-config/http-request-defaults.png jmeter/trunk/docs/images/screenshots/template_menu.png jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png jmeter/trunk/docs/images/screenshots/webtest/http-request1.png jmeter/trunk/docs/images/screenshots/webtest/http-request2.png jmeter/trunk/docs/images/screenshots/webtest/http_login.png jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png jmeter/trunk/src/components/org/apache/jmeter/assertions/JSONPathAssertion.java jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java jmeter/trunk/src/core/org/apache/jmeter/gui/GlobalUndoableEdit.java jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistoryItem.java jmeter/trunk/src/core/org/apache/jmeter/gui/action/RemoteStart.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/HorizontalPanel.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/PowerTableModel.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/theme/darcula_theme.xml jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleWriter.java jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java jmeter/trunk/src/core/org/apache/jmeter/reporters/gui/ResultActionGui.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/src/core/org/apache/jmeter/samplers/AsynchSampleSender.java jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSenderFactory.java jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java jmeter/trunk/src/core/org/apache/jmeter/save/ScriptWrapperConverter.java jmeter/trunk/src/core/org/apache/jmeter/save/converters/HashTreeConverter.java jmeter/trunk/src/core/org/apache/jmeter/save/converters/SampleSaveConfigurationConverter.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TypeEditor.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java jmeter/trunk/src/core/org/apache/jmeter/testelement/property/NumberProperty.java jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellBeanInfoSupport.java jmeter/trunk/src/core/org/apache/jmeter/util/Calculator.java jmeter/trunk/src/core/org/apache/jmeter/util/CustomX509TrustManager.java jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java jmeter/trunk/src/core/org/apache/jmeter/util/JSR223BeanInfoSupport.java jmeter/trunk/src/core/org/apache/jmeter/util/JsseSSLManager.java jmeter/trunk/src/examples/org/apache/jmeter/examples/sampler/gui/ExampleSamplerGui.java jmeter/trunk/src/examples/org/apache/jmeter/examples/testbeans/example3/Example3.java jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java jmeter/trunk/src/functions/org/apache/jmeter/functions/Jexl2Function.java jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java jmeter/trunk/src/functions/org/apache/jmeter/functions/SplitFunction.java jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java jmeter/trunk/src/functions/org/apache/jmeter/functions/Uuid.java jmeter/trunk/src/functions/org/apache/jmeter/functions/XPath.java jmeter/trunk/src/jorphan/org/apache/jorphan/collections/Data.java jmeter/trunk/src/jorphan/org/apache/jorphan/gui/MenuScroller.java jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/Functor.java jmeter/trunk/src/jorphan/org/apache/jorphan/util/Converter.java jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java jmeter/trunk/src/junit/test/AfterAnnotatedTest.java jmeter/trunk/src/junit/test/BeforeAnnotatedTest.java jmeter/trunk/src/junit/test/DummyAnnotatedTest.java jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/KerberosManager.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/RecordController.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/RegExUserParameters.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/BaseParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParserCacheLoader.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/JTidyHTMLParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLCollection.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/SamplerCreatorFactory.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AccessLogSamplerBeanInfo.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPResultConverter.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SessionFilter.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ClientPool.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPublisherGui.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/render/ObjectMessageRenderer.java jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArguments.java jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LdapExtConfigGui.java jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/config/MongoSourceElement.java jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/config/MongoSourceElementBeanInfo.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/control/gui/TCPSamplerGui.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java jmeter/trunk/test/src/org/apache/jmeter/control/TestTransactionController.java jmeter/trunk/test/src/org/apache/jmeter/functions/SumFunctionTest.java jmeter/trunk/test/src/org/apache/jmeter/functions/TestDigestFunction.java jmeter/trunk/test/src/org/apache/jmeter/functions/TestFileToString.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestHTTPMirrorThread.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBaseParser.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java jmeter/trunk/test/src/org/apache/jmeter/report/dashboard/ApdexPerTransactionTest.java jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java jmeter/trunk/test/src/org/apache/jmeter/resources/TestPropertiesFiles.java jmeter/trunk/test/src/org/apache/jmeter/test/ResourceLocator.java jmeter/trunk/test/src/org/apache/jmeter/testelement/TestNumberProperty.java jmeter/trunk/test/src/org/apache/jmeter/util/XPathUtilTest.java jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSampleCompareTo.java jmeter/trunk/xdocs/changes.xml Modified: jmeter/trunk/build.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/build.properties?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/build.properties (original) +++ jmeter/trunk/build.properties Wed Dec 6 22:21:19 2017 @@ -80,10 +80,10 @@ bcpkix.jar = bcpkix-jdk bcpkix.loc = ${maven2.repo}/org/bouncycastle/bcpkix-jdk15on/${bcprov.version} bcpkix.md5 = cb025ef84fb991e14fdf62f6bef7be53 -dec.version = 0.1.2 -dec.jar = dec-${dec.version}.jar -dec.loc = ${maven2.repo}/org/brotli/dec/${dec.version} -dec.md5 = 4b1cd14cf29733941cc536b27e6aedfa +dec.version = 0.1.2 +dec.jar = dec-${dec.version}.jar +dec.loc = ${maven2.repo}/org/brotli/dec/${dec.version} +dec.md5 = 4b1cd14cf29733941cc536b27e6aedfa caffeine.version = 2.5.5 caffeine.jar = caffeine-${caffeine.version}.jar @@ -140,12 +140,10 @@ commons-pool2.jar = commons- commons-pool2.loc = ${maven2.repo}/org/apache/commons/commons-pool2/${commons-pool2.version} commons-pool2.md5 = 62727a85e2e1bf6a756f5571d19cc71c -# Optional for use by checkstyle -darcula.version = e208efb96f70e4be9dc362fbb46f6e181ef501dd -darcula.jar = darcula.jar -darcula.loc = https://github.com/bulenkov/Darcula/raw/${darcula.version}/build -darcula.md5 = 5afdcd4e299f71fb9dfd1740937bfbea - +darcula.version = e208efb96f70e4be9dc362fbb46f6e181ef501dd +darcula.jar = darcula.jar +darcula.loc = https://github.com/bulenkov/Darcula/raw/${darcula.version}/build +darcula.md5 = 5afdcd4e299f71fb9dfd1740937bfbea # dnsjava for DNSCacheManager (http://www.dnsjava.org/ BSD license) dnsjava.version = 2.1.8 @@ -185,7 +183,6 @@ httpasyncclient.md5 = 73d4a # Apache HttpClient 4.x httpclient.version = 4.5.3 -# httpclient.jar = httpclient-${httpclient.version}.jar httpclient.loc = ${maven2.repo}/org/apache/httpcomponents/httpclient/${httpclient.version} httpclient.md5 = 1965ebb7aca0f9f8faaed3870d8cf689 @@ -433,10 +430,10 @@ jdom.loc = ${maven2.r jdom.md5 = 140bfed13341fe2039eee0f26a16d705 # Optional for use by checkstyle -checkstyle-all.version = 6.13 +checkstyle-all.version = 8.5 checkstyle-all.jar = checkstyle-${checkstyle-all.version}-all.jar checkstyle-all.loc = http://downloads.sourceforge.net/checkstyle/checkstyle/${checkstyle-all.version}/checkstyle-${checkstyle-all.version}-all.jar?ts=${EPOCHSECONDS}&use_mirror=autoselect -checkstyle-all.md5 = ac6e1e81d09bcaf4c0c22181e9bda1d9 +checkstyle-all.md5 = 6e7d8b1e9a750be769037cc7e3bada40 # Optional for use by rat rat.version = 0.12 @@ -455,29 +452,29 @@ jacocoant.loc = ${maven2. jacocoant.md5 = 134a9863234844bf156143dad39564e2 # Optional for use by JDBC_TESTS.jmx -hsqldb.version = 2.4.0 -hsqldb.jar = hsqldb-${hsqldb.version}.jar -hsqldb.loc = ${maven2.repo}/org/hsqldb/hsqldb/${hsqldb.version} -hsqldb.md5 = 72cae1d3ef411edc74bc3ff4d12bd47c +hsqldb.version = 2.4.0 +hsqldb.jar = hsqldb-${hsqldb.version}.jar +hsqldb.loc = ${maven2.repo}/org/hsqldb/hsqldb/${hsqldb.version} +hsqldb.md5 = 72cae1d3ef411edc74bc3ff4d12bd47c # Optional for use by JMS_TESTS.jmx -activemq-all.version = 5.15.2 -activemq-all.jar = activemq-all-${activemq-all.version}.jar -activemq-all.loc = ${maven2.repo}/org/apache/activemq/activemq-all/${activemq-all.version} -activemq-all.md5 = bd24ae082be11dc969a6e5bc45515ab7 +activemq-all.version = 5.15.2 +activemq-all.jar = activemq-all-${activemq-all.version}.jar +activemq-all.loc = ${maven2.repo}/org/apache/activemq/activemq-all/${activemq-all.version} +activemq-all.md5 = bd24ae082be11dc969a6e5bc45515ab7 # Optional for use by FTP_TESTS.jmx -mina-core.version = 2.0.16 -mina-core.jar = mina-core-${mina-core.version}.jar -mina-core.loc = ${maven2.repo}/org/apache/mina/mina-core/${mina-core.version} -mina-core.md5 = fd86528fa9d9ba8fb8c37e3ac28fa45f - -ftplet-api.version = 1.1.1 -ftplet-api.jar = ftplet-api-${ftplet-api.version}.jar -ftplet-api.loc = ${maven2.repo}/org/apache/ftpserver/ftplet-api/${ftplet-api.version} -ftplet-api.md5 = a17a7513f5a7e2cd717f7b0fbd15241a - -ftpserver-core.version = 1.1.1 -ftpserver-core.jar = ftpserver-core-${ftpserver-core.version}.jar -ftpserver-core.loc = ${maven2.repo}/org/apache/ftpserver/ftpserver-core/${ftpserver-core.version} -ftpserver-core.md5 = 62b0a623ff211013d3056dbdf26139b2 +mina-core.version = 2.0.16 +mina-core.jar = mina-core-${mina-core.version}.jar +mina-core.loc = ${maven2.repo}/org/apache/mina/mina-core/${mina-core.version} +mina-core.md5 = fd86528fa9d9ba8fb8c37e3ac28fa45f + +ftplet-api.version = 1.1.1 +ftplet-api.jar = ftplet-api-${ftplet-api.version}.jar +ftplet-api.loc = ${maven2.repo}/org/apache/ftpserver/ftplet-api/${ftplet-api.version} +ftplet-api.md5 = a17a7513f5a7e2cd717f7b0fbd15241a + +ftpserver-core.version = 1.1.1 +ftpserver-core.jar = ftpserver-core-${ftpserver-core.version}.jar +ftpserver-core.loc = ${maven2.repo}/org/apache/ftpserver/ftpserver-core/${ftpserver-core.version} +ftpserver-core.md5 = 62b0a623ff211013d3056dbdf26139b2 Modified: jmeter/trunk/build.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/build.xml (original) +++ jmeter/trunk/build.xml Wed Dec 6 22:21:19 2017 @@ -3436,57 +3436,18 @@ run JMeter unless all the JMeter jars ar </antcall> </target> - <!-- Special: process to get RSyntaxTextArea--> - <!-- Useless since rsyntaxtextarea artifacts are published to Maven Repo since 9th july 2014 (JMeter 2.12) --> - <!-- - <target name="_process_rsyntaxtextarea"> - <available file="./lib/${rsyntaxtextarea.jar}" property="rsyntaxtextarea.exists"/> - <antcall target="_get_rsyntaxtextarea"/> - </target> - --> - <!-- Get RSyntaxTextArea binary zip file, unpack it, pick up jar file and remove the zip --> - <!-- Useless since rsyntaxtextarea artifacts are published to Maven Repo since 9th july 2014 (JMeter 2.12) --> - <!-- - <target name="_get_rsyntaxtextarea" unless="rsyntaxtextarea.exists"> - <property name="loc" value="${rsyntaxtextarea.loc}"/> - <property name="zip" value="${rsyntaxtextarea.name}_${rsyntaxtextarea.version}.zip"/> - <property name="jar" value="${rsyntaxtextarea.name}.jar"/> - <property name="md5" value="${rsyntaxtextarea.md5}"/> - <property name="path" value="./lib"/> - <get src="${loc}/${zip}" - dest="${build.dir}/${zip}" - usetimestamp="true" ignoreerrors="false"/> - <unzip dest="${build.dir}" src="${build.dir}/${zip}"> - <patternset> - <include name="**/${jar}"/> - </patternset> - <mapper type="flatten"/> - </unzip> - <antcall target="_checkMD5"> - <param name="file" value="${build.dir}/${jar}"/> - <param name="path" value="${build.dir}"/> - <param name="md5" value="${md5}"/> - </antcall> - <delete> - <fileset dir="${path}" includes="${rsyntaxtextarea.name}-*.jar"/> - </delete> - <move preservelastmodified="true" overwrite="true" - file="${build.dir}/${jar}" tofile="${path}/${rsyntaxtextarea.jar}" verbose="true"/> - <delete file="${build.dir}/${zip}"/> - </target> - --> - <!-- Need to define config_loc for use by Eclipse --> <property name="config_loc" value="."/> <target name="checkstyle"> <available property="checkstyle.jar.available" file="${lib.opt}/${checkstyle-all.jar}"/> - <fail message="This task requires checkstyle, please run download_checkstyle target to download checkstyle" unless="checkstyle.jar.available"/> + <fail message="This task requires checkstyle, please run download_checkstyle target to download checkstyle" + unless="checkstyle.jar.available"/> - <antcall target="_process_checkstyle_jars"></antcall> + <antcall target="_process_checkstyle_jars"/> <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpath="${lib.opt}/${checkstyle-all.jar}"/> <checkstyle config="checkstyle.xml"> - <fileset dir="src" includes="**/*.java"/> + <fileset dir="src" includes="**/*"/> <formatter type="plain"/> <formatter type="xml" toFile="build/checkstyle_errors.xml"/> </checkstyle> @@ -3495,7 +3456,8 @@ run JMeter unless all the JMeter jars ar <target name="rat"> <available property="rat.jar.available" file="${lib.opt}/${rat.jar}"/> - <fail message="This task requires Apache Creadur RAT, please run download_rat target to download it" unless="rat.jar.available"/> + <fail message="This task requires Apache Creadur RAT, please run download_rat target to download it" + unless="rat.jar.available"/> <taskdef uri="antlib:org.apache.rat.anttasks" resource="org/apache/rat/anttasks/antlib.xml"> Modified: jmeter/trunk/checkstyle-suppressions.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/checkstyle-suppressions.xml?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/checkstyle-suppressions.xml (original) +++ jmeter/trunk/checkstyle-suppressions.xml Wed Dec 6 22:21:19 2017 @@ -18,10 +18,9 @@ limitations under the License. <!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" - "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> + "http://checkstyle.sourceforge.net/dtds/suppressions_1_1.dtd"> <suppressions> - <!-- On Windows, it appears that Checkstyle matches files using \ delims --> - <suppress checks="JavadocPackage" files="[/\\]examples[/\\].*\.java"/> - <suppress checks="JavadocPackage" files="[/\\]test[/\\].*\.java"/> + <suppress checks="NewlineAtEndOfFile" files=".*.properties"/> + <suppress checks="FileLength" files="HTTPSamplerBase.java"/> </suppressions> \ No newline at end of file Modified: jmeter/trunk/checkstyle.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/checkstyle.xml?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/checkstyle.xml (original) +++ jmeter/trunk/checkstyle.xml Wed Dec 6 22:21:19 2017 @@ -16,12 +16,8 @@ limitations under the License. --> <!DOCTYPE module PUBLIC - "-//Puppy Crawl//DTD Check Configuration 1.1//EN" - "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> - -<!-- - Checkstyle checks configured for Maven. ---> + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" + "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> <module name="Checker"> @@ -37,84 +33,149 @@ <property name="fileExtensions" value="java, groovy"/> </module> - <!-- No tabs allowed! --> + <!-- Miscellaneous --> <module name="FileTabCharacter"> - <property name="fileExtensions" value="java, groovy, xml, xsd, dtd, htm, html, txt"/> + <!-- No tabs allowed! --> + <property name="fileExtensions" value="java, groovy, xml, xsd, dtd, htm, html, txt, properties"/> </module> - <module name="NewlineAtEndOfFile"/> + <module name="RegexpMultiline"> + <!-- No more than 2 blank lines allowed. --> + <property name="format" value="\r?\n[\t ]*\r?\n[\t ]*\r?\n[\t ]*\r?\n"/> + <property name="fileExtensions" value="java, xml, properties"/> + <property name="message" value="Unnecessary consecutive lines"/> + </module> + <!--<module name="RegexpOnFilename">--> + <!--<property name="folderPattern" value="[\\/]src[\\/]\w+[\\/]java[\\/]"/>--> + <!--<property name="fileNamePattern" value="\.java$"/>--> + <!--<property name="match" value="false"/>--> + <!--<message key="regexp.filepath.mismatch" value="Only java files should be located in the ''src/*/java'' folders."/>--> + <!--</module>--> + <module name="UniqueProperties"> + <property name="fileExtensions" value="properties"/> + </module> - <module name="TreeWalker"> - - <!-- Operator must be at end of wrapped line --> -<!-- - <module name="OperatorWrap"> - <property name="option" value="eol"/> - </module> ---> + <!-- Size Violations --> + <module name="FileLength"> + <property name="fileExtensions" value="java, groovy"/> + </module> - <!-- Interfaces must be types (not just constants) --> - <module name="InterfaceIsType"/> + <module name="TreeWalker"> - <!-- Must have class / interface header comments --> -<!-- - <module name="JavadocType"/> ---> - <!-- Require method javadocs, allow undeclared RTE --> -<!-- - <module name="JavadocMethod"> - <property name="allowUndeclaredRTE" value="true"/> - <property name="allowMissingThrowsTags" value="true"/> + <!-- Annotations --> + <!--<module name="MissingDeprecated"/>--> + <module name="MissingOverride"/> + + <!-- Block checks --> + <module name="AvoidNestedBlocks"/> + <module name="EmptyBlock"/> + <module name="EmptyCatchBlock"> + <property name="exceptionVariableName" value="expected|ignore"/> </module> ---> - - <!-- Require field javadoc --> -<!-- - <module name="JavadocVariable"/> ---> + <!--<module name="LeftCurly"/>--> + <!--<module name="RightCurly"/>--> + <module name="NeedBraces"/> - <!-- No public fields --> -<!-- - <module name="VisibilityModifier"> - <property name="protectedAllowed" value="true"/> + <!--Class Design--> + <!--<module name="FinalClass"/>--> + <!--<module name="HideUtilityClassConstructor"/>--> <!--need to change 25 class APIs--> + <module name="InterfaceIsType"/> <!-- Interfaces must be types (not just constants) --> + <module name="MutableException"/> + <module name="OneTopLevelClass"/> + <module name="ThrowsCount"> + <property name="max" value="5"/> + <property name="ignorePrivateMethods" value="false"/> </module> ---> + <!-- Coding --> + <module name="CovariantEquals"/> <!-- Require hash code override when equals is --> <module name="EqualsHashCode"/> - - <!-- Disallow unnecessary instantiation of Boolean, String --> <module name="IllegalInstantiation"> - <property name="classes" value="java.lang.Boolean, java.lang.String"/> + <property name="classes" value="java.lang.Boolean"/> </module> - - <module name="AvoidStarImport"/> - + <module name="IllegalThrows"/> + <module name="MissingSwitchDefault"/> + <module name="ModifiedControlVariable"/> + <module name="MultipleVariableDeclarations"/> + <module name="NestedForDepth"/> + <module name="NestedIfDepth"> + <!-- TODO: reduce this number --> + <property name="max" value="4"/> + </module> + <module name="NestedTryDepth"> + <property name="max" value="2"/> + </module> + <module name="OneStatementPerLine"/> + <!--<module name="ParameterAssignment"/>--> + <module name="ReturnCount"> + <!-- TODO: reduce these numbers --> + <property name="max" value="9" /> + <property name="maxForVoid" value="9"/> + </module> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="StringLiteralEquality"/> + <module name="SuperFinalize"/> + <module name="UnnecessaryParentheses"/> + <!--<module name="VariableDeclarationUsageDistance"/>--> + + <!-- Imports --> + <module name="AvoidStarImport"> + <property name="allowClassImports" value="false"/> + <property name="allowStaticMemberImports" value="false"/> + </module> + <module name="RedundantImport"/> <module name="UnusedImports"/> + <module name="ImportOrder"> + <property name="groups" value="/^java\./,javax,org,net,com"/> + <property name="ordered" value="true"/> + <property name="separated" value="true"/> + <property name="option" value="top"/> + <property name="sortStaticImportsAlphabetically" value="true"/> + </module> - <module name="NeedBraces"/> - - <!-- Required for SuppressionCommentFilter below --> - <module name="FileContentsHolder"/> + <!-- JavaDocs --> +<!-- + <module name="JavadocMethod"> + <property name="minLineCount" value="3"/> + <property name="scope" value="protected"/> + <property name="allowUndeclaredRTE" value="true"/> + <property name="allowMissingThrowsTags" value="true"/> + <property name="allowMissingPropertyJavadoc" value="true"/> + <property name="ignoreMethodNamesRegex" value="(get|set|is).*"/> + <!– Only check methods, i.e. ignore constructors –> + <property name="tokens" value="METHOD_DEF"/> + </module> + --> + <!--<module name="NonEmptyAtclauseDescription"/>--> + <!-- Misc --> + <module name="ArrayTypeStyle"/> + <module name="AvoidEscapedUnicodeCharacters"/> + <!--<module name="CommentsIndentation"/>--> + <module name="OuterTypeFilename"/> + <module name="UpperEll"/> + + <!-- code metrics --> + <!--<module name="BooleanExpressionComplexity"/>--> + <!--<module name="ClassFanOutComplexity"/>--> + <!--<module name="CyclomaticComplexity"/>--> + <!--<module name="NPathComplexity"/>--> + + <!-- + Allow comment to suppress checkstyle for a single line + e.g. // CHECKSTYLE IGNORE MagicNumber + --> + <module name="SuppressWithNearbyCommentFilter"> + <property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/> + <property name="checkFormat" value="$1"/> + </module> </module> - <!-- Setup special comments to suppress specific checks from source files - CHECKSTYLE\:OFF and CHECKSTYLE\:ON --> - <module name="SuppressionCommentFilter"/> - <module name="SuppressionFilter"> <!-- config_loc is used by Eclipse plugin --> <property name="file" value="${config_loc}/checkstyle-suppressions.xml"/> </module> - <!-- - Allow comment to suppress checkstyle for a single line - e.g. // CHECKSTYLE IGNORE MagicNumber - --> - <module name="SuppressWithNearbyCommentFilter"> - <property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/> - <property name="checkFormat" value="$1"/> - </module> - </module> Modified: jmeter/trunk/docs/images/screenshots/Proxy_Run.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/Proxy_Run.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/Select-Templates-Icon.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/Select-Templates-Icon.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/Test_Generated.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/Test_Generated.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/Validate-Test-Plan.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/Validate-Test-Plan.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/example-recording.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/example-recording.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/example-thread-group.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/example-thread-group.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/http-config/http-request-defaults.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/http-config/http-request-defaults.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/template_menu.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/template_menu.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/http-defaults1.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/http-defaults2.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/http-request1.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/http-request1.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/http-request2.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/http-request2.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/http_login.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/http_login.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/threadgroup.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/webtest/threadgroup2.png?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== Binary files - no diff available. Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/JSONPathAssertion.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSONPathAssertion.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/assertions/JSONPathAssertion.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/assertions/JSONPathAssertion.java Wed Dec 6 22:21:19 2017 @@ -29,11 +29,11 @@ import org.apache.oro.text.regex.Pattern import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.jayway.jsonpath.JsonPath; - import net.minidev.json.JSONArray; import net.minidev.json.JSONObject; +import com.jayway.jsonpath.JsonPath; + /** * This is main class for JSONPath Assertion which verifies assertion on * previous sample result using JSON path expression Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java Wed Dec 6 22:21:19 2017 @@ -189,7 +189,7 @@ public class ResponseAssertion extends A } private void setTestTypeMasked(int testType) { - int value = getTestType() & ~(TYPE_MASK) | testType; + int value = getTestType() & ~TYPE_MASK | testType; setProperty(new IntegerProperty(TEST_TYPE, value)); } @@ -347,7 +347,7 @@ public class ResponseAssertion extends A return result.setResultForNull(); } - boolean pass = true; + boolean pass; boolean hasTrue = false; ArrayList<String> allCheckMessage = new ArrayList<>(); try { Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java Wed Dec 6 22:21:19 2017 @@ -28,12 +28,12 @@ import javax.swing.JTextArea; import javax.swing.JTextField; import org.apache.jmeter.assertions.BeanShellAssertion; +import org.apache.jmeter.gui.util.FilePanelEntry; import org.apache.jmeter.gui.util.JSyntaxTextArea; import org.apache.jmeter.gui.util.JTextScrollPane; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.property.BooleanProperty; import org.apache.jmeter.util.JMeterUtils; -import org.apache.jmeter.gui.util.FilePanelEntry; public class BeanShellAssertionGui extends AbstractAssertionGui { @@ -88,8 +88,7 @@ public class BeanShellAssertionGui exten return "bsh_assertion_title"; // $NON-NLS-1$ } - private JPanel createFilenamePanel() - { + private JPanel createFilenamePanel() { JPanel filenamePanel = new JPanel(new BorderLayout()); filenamePanel.add(filename, BorderLayout.CENTER); Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java Wed Dec 6 22:21:19 2017 @@ -17,6 +17,13 @@ */ package org.apache.jmeter.assertions.gui; +import java.awt.BorderLayout; + +import javax.swing.BorderFactory; +import javax.swing.JCheckBox; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + import org.apache.jmeter.assertions.JSONPathAssertion; import org.apache.jmeter.gui.util.VerticalPanel; import org.apache.jmeter.testelement.TestElement; @@ -24,22 +31,12 @@ import org.apache.jmeter.util.JMeterUtil import org.apache.jorphan.gui.JLabeledTextArea; import org.apache.jorphan.gui.JLabeledTextField; - -import javax.swing.JCheckBox; -import javax.swing.BorderFactory; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import java.awt.BorderLayout; - /** * Java class representing GUI for the {@link JSONPathAssertion} component in JMeter * @since 4.0 */ public class JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener { - /** - * - */ private static final long serialVersionUID = -6008018002423594040L; private JLabeledTextField jsonPath = null; private JLabeledTextArea jsonValue = null; Modified: jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java Wed Dec 6 22:21:19 2017 @@ -41,8 +41,9 @@ import org.slf4j.LoggerFactory; * The current implementation executes the first N samples (BYNUMBER) * or the last N% of samples (BYPERCENT). */ -public class ThroughputController extends GenericController implements Serializable, LoopIterationListener, - TestStateListener { +public class ThroughputController + extends GenericController + implements Serializable, LoopIterationListener, TestStateListener { private static final long serialVersionUID = 234L; @@ -80,19 +81,13 @@ public class ThroughputController extend private transient Object counterLock = new Object(); // ensure counts are updated correctly - /** - * Number of iterations on which we've chosen to deliver samplers. - */ + /** Number of iterations on which we've chosen to deliver samplers. */ private int numExecutions = 0; - /** - * Index of the current iteration. 0-based. - */ + /** Index of the current iteration. 0-based. */ private int iteration = -1; - /** - * Whether to deliver samplers on this iteration. - */ + /** Whether to deliver samplers on this iteration. */ private boolean runThisTime; public ThroughputController() { @@ -135,7 +130,7 @@ public class ThroughputController extend JMeterProperty prop = getProperty(MAXTHROUGHPUT); int retVal = 1; if (prop instanceof IntegerProperty) { - retVal = ((IntegerProperty) prop).getIntValue(); + retVal = prop.getIntValue(); } else { String valueString = prop.getStringValue(); try { @@ -163,7 +158,7 @@ public class ThroughputController extend JMeterProperty prop = getProperty(PERCENTTHROUGHPUT); float retVal = 100; if (prop instanceof FloatProperty) { - retVal = ((FloatProperty) prop).getFloatValue(); + retVal = prop.getFloatValue(); } else { String valueString = prop.getStringValue(); try { @@ -214,8 +209,9 @@ public class ThroughputController extend if (subControllersAndSamplers.isEmpty()) { return true; } else { - return getStyle() == BYNUMBER && getExecutions() >= getMaxThroughputAsInt() - && current >= getSubControllers().size(); + return getStyle() == BYNUMBER + && getExecutions() >= getMaxThroughputAsInt() + && current >= getSubControllers().size(); } } Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java Wed Dec 6 22:21:19 2017 @@ -125,7 +125,6 @@ public class HtmlExtractorGui extends Ab } else { htmlExtractor.setExtractor(USE_DEFAULT_EXTRACTOR_IMPL); } - } } @@ -156,8 +155,6 @@ public class HtmlExtractorGui extends Ab add(makeParameterPanel(), BorderLayout.CENTER); } - - private Component makeExtractorPanel() { JPanel panel = new HorizontalPanel(); panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("html_extractor_type"))); //$NON-NLS-1$ Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java Wed Dec 6 22:21:19 2017 @@ -28,14 +28,14 @@ import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import net.minidev.json.JSONArray; +import net.minidev.json.JSONObject; + import com.jayway.jsonpath.Configuration; import com.jayway.jsonpath.JsonPath; import com.jayway.jsonpath.Option; import com.jayway.jsonpath.PathNotFoundException; -import net.minidev.json.JSONArray; -import net.minidev.json.JSONObject; - /** * Handles the extractions * https://github.com/jayway/JsonPath/blob/master/json-path/src/test/java/com/jayway/jsonpath/ComplianceTest.java Modified: jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/reporters/MailerModel.java Wed Dec 6 22:21:19 2017 @@ -144,7 +144,7 @@ public class MailerModel extends Abstrac /** * Gets a List of String-objects. Each String is one mail-address of the * addresses-String set by <code>setToAddress(str)</code>. The addresses - * must be seperated by commas. Only String-objects containing a "@" are + * must be separated by commas. Only String-objects containing a "@" are * added to the returned List. * * @return a List of String-objects wherein each String represents a @@ -176,8 +176,7 @@ public class MailerModel extends Abstrac * Adds a SampleResult for display in the Visualizer. * * @param sample - * the SampleResult encapsulating informations about the last - * sample. + * the SampleResult encapsulating information about the last sample. */ public void add(SampleResult sample) { add(sample, false); @@ -247,8 +246,6 @@ public class MailerModel extends Abstrac notifyChangeListeners(); } - - /** * Resets the state of this object to its default. But: This method does not * reset any mail-specific attributes (like sender, mail-subject...) since Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java Wed Dec 6 22:21:19 2017 @@ -19,11 +19,11 @@ package org.apache.jmeter.timers; import java.beans.PropertyDescriptor; + import org.apache.jmeter.testbeans.BeanInfoSupport; /** * BeanInfo for the ConstantThroughputTimer. - * */ public class ConstantThroughputTimerBeanInfo extends BeanInfoSupport { Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/Graph.java Wed Dec 6 22:21:19 2017 @@ -220,7 +220,7 @@ public class Graph extends JComponent im } g.drawLine(adjustedWidth, height - data, adjustedWidth, height - data - 1); if (log.isDebugEnabled()) { - log.debug("Drawing coords = {}, {}", adjustedWidth, (height - data)); + log.debug("Drawing coords = {}, {}", adjustedWidth, height - data); } } Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsXML.java Wed Dec 6 22:21:19 2017 @@ -150,7 +150,7 @@ public class RenderAsXML extends Sampler } private void applyToChildren(TreePath parent, Consumer<TreePath> method) { - TreeNode node = ((TreeNode) parent.getLastPathComponent()); + TreeNode node = (TreeNode) parent.getLastPathComponent(); Enumeration<?> e = node.children(); while (e.hasMoreElements()) { TreeNode n = (TreeNode) e.nextElement(); Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java Wed Dec 6 22:21:19 2017 @@ -22,15 +22,6 @@ package org.apache.jmeter.visualizers; import java.awt.BorderLayout; import java.awt.Dimension; -import javafx.application.Platform; -import javafx.beans.value.ChangeListener; -import javafx.beans.value.ObservableValue; -import javafx.concurrent.Worker.State; -import javafx.embed.swing.JFXPanel; -import javafx.scene.Scene; -import javafx.scene.web.WebEngine; -import javafx.scene.web.WebView; - import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JOptionPane; @@ -41,6 +32,15 @@ import javax.swing.SwingUtilities; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.util.JMeterUtils; +import javafx.application.Platform; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; +import javafx.concurrent.Worker.State; +import javafx.embed.swing.JFXPanel; +import javafx.scene.Scene; +import javafx.scene.web.WebEngine; +import javafx.scene.web.WebView; + /** * {@link ResultRenderer} implementation that uses JAVAFX WebEngine to render as browser do * @since 3.2 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java Wed Dec 6 22:21:19 2017 @@ -485,27 +485,25 @@ implements ActionListener, TreeSelection log.warn("Error loading result renderer: {}", clazz, e); } } - if(VIEWERS_ORDER.length()>0) { - String[] keys = VIEWERS_ORDER.split(","); - for (String key : keys) { - if(key.startsWith(".")) { - key = "org.apache.jmeter.visualizers"+key; //$NON-NLS-1$ - } - ResultRenderer renderer = map.remove(key); - if(renderer != null) { - selectRenderPanel.addItem(renderer); - } else { - log.warn( - "Missing (check spelling error in renderer name) or already added(check doublon) " - + "result renderer, check property 'view.results.tree.renderers_order', renderer name: '{}'", - key); - } - } + if (VIEWERS_ORDER.length() > 0) { + Arrays.stream(VIEWERS_ORDER.split(",")) + .map(key -> key.startsWith(".") + ? "org.apache.jmeter.visualizers" + key //$NON-NLS-1$ + : key) + .forEach(key -> { + ResultRenderer renderer = map.remove(key); + if (renderer != null) { + selectRenderPanel.addItem(renderer); + } else { + log.warn( + "Missing (check renderer name) or already added (check doublon) result renderer," + + " check property 'view.results.tree.renderers_order', renderer name: '{}'", + key); + } + }); } // Add remaining (plugins or missed in property) - for (ResultRenderer renderer : map.values()) { - selectRenderPanel.addItem(renderer); - } + map.values().forEach(renderer -> selectRenderPanel.addItem(renderer)); nodesModel.setSelectedItem(textObject); // preset to "Text" option return selectRenderPanel; } Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java Wed Dec 6 22:21:19 2017 @@ -212,10 +212,13 @@ public class BackendListener extends Abs } SampleResult sampleResult = listenerClientData.queue.take(); if (isDebugEnabled) { - log.debug("Thread: {} took SampleResult: {}, isFinal: {}", Thread.currentThread().getName(), - sampleResult, (sampleResult == FINAL_SAMPLE_RESULT)); + log.debug("Thread: {} took SampleResult: {}, isFinal: {}", + Thread.currentThread().getName(), + sampleResult, + sampleResult == FINAL_SAMPLE_RESULT); } - while (!(endOfLoop = (sampleResult == FINAL_SAMPLE_RESULT)) && sampleResult != null ) { // try to process as many as possible + // try to process as many as possible + while (!(endOfLoop = FINAL_SAMPLE_RESULT.equals(sampleResult)) && sampleResult != null ) { sampleResults.add(sampleResult); if (isDebugEnabled) { log.debug("Thread: {} polling from queue: {}", Thread.currentThread().getName(), Modified: jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java Wed Dec 6 22:21:19 2017 @@ -20,7 +20,6 @@ package org.apache.jmeter; // N.B. this must only use standard Java packages import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; @@ -28,6 +27,7 @@ import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; import java.security.AccessController; +import java.security.PrivilegedAction; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -63,7 +63,7 @@ public final class NewDriver { final String initial_classpath = System.getProperty(JAVA_CLASS_PATH); // Find JMeter home dir from the initial classpath - String tmpDir=null; + String tmpDir; StringTokenizer tok = new StringTokenizer(initial_classpath, File.pathSeparator); if (tok.countTokens() == 1 || (tok.countTokens() == 2 // Java on Mac OS can add a second entry to the initial classpath @@ -74,6 +74,7 @@ public final class NewDriver { try { tmpDir = jar.getCanonicalFile().getParentFile().getParent(); } catch (IOException e) { + tmpDir = null; } } else {// e.g. started from IDE with full classpath tmpDir = System.getProperty("jmeter.home","");// Allow override $NON-NLS-1$ $NON-NLS-2$ @@ -96,7 +97,7 @@ public final class NewDriver { new File(JMETER_INSTALLATION_DIRECTORY + File.separator + "lib" + File.separator + "ext"),// $NON-NLS-1$ $NON-NLS-2$ new File(JMETER_INSTALLATION_DIRECTORY + File.separator + "lib" + File.separator + "junit")};// $NON-NLS-1$ $NON-NLS-2$ for (File libDir : libDirs) { - File[] libJars = libDir.listFiles((FilenameFilter) (dir, name) -> name.endsWith(".jar")); + File[] libJars = libDir.listFiles((dir, name) -> name.endsWith(".jar")); if (libJars == null) { new Throwable("Could not access " + libDir).printStackTrace(); // NOSONAR No logging here continue; @@ -127,12 +128,8 @@ public final class NewDriver { // ClassFinder needs the classpath System.setProperty(JAVA_CLASS_PATH, initial_classpath + classpath.toString()); loader = AccessController.doPrivileged( - new java.security.PrivilegedAction<DynamicClassLoader>() { - @Override - public DynamicClassLoader run() { - return new DynamicClassLoader(jars.toArray(new URL[jars.size()])); - } - } + (PrivilegedAction<DynamicClassLoader>) () -> + new DynamicClassLoader(jars.toArray(new URL[jars.size()])) ); } Modified: jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java Wed Dec 6 22:21:19 2017 @@ -21,7 +21,6 @@ package org.apache.jmeter.assertions.gui import java.util.Arrays; import java.util.Collection; - import org.apache.jmeter.gui.AbstractScopedJMeterGuiComponent; import org.apache.jmeter.gui.util.MenuFactory; @@ -32,7 +31,6 @@ import org.apache.jmeter.gui.util.MenuFa * need to use the createScopePanel() to add the panel to the GUI, and they also * need to use saveScopeSettings() and showScopeSettings() to keep the test element * and GUI in synch. - * */ public abstract class AbstractAssertionGui extends AbstractScopedJMeterGuiComponent { Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java Wed Dec 6 22:21:19 2017 @@ -28,6 +28,7 @@ import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.ListSelectionModel; + import org.apache.jmeter.config.ConfigTestElement; import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer; import org.apache.jmeter.gui.util.PowerTableModel; Modified: jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java Wed Dec 6 22:21:19 2017 @@ -136,7 +136,7 @@ public class FunctionHelper extends JDia private void initializeFunctionList() { String[] functionNames = CompoundVariable.getFunctionNames(); - Arrays.sort(functionNames, (o1, o2) -> o1.compareToIgnoreCase(o2)); + Arrays.sort(functionNames, String::compareToIgnoreCase); functionList = new JLabeledChoice(JMeterUtils.getResString("choose_function"), functionNames); //$NON-NLS-1$ functionList.addChangeListener(this); } @@ -152,13 +152,14 @@ public class FunctionHelper extends JDia this.validate(); resultTextArea.setText(""); this.repaint(); - } catch (InstantiationException | IllegalAccessException e) { + } catch (InstantiationException | IllegalAccessException ex) { + log.info("Exception during stateChanged", ex); } } /** - * @throws InstantiationException if function instanciation fails - * @throws IllegalAccessException if function instanciation fails + * @throws InstantiationException if function instantiation fails + * @throws IllegalAccessException if function instantiation fails */ protected void initParameterPanel() throws InstantiationException, IllegalAccessException { Arguments args = new Arguments(); Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/GlobalUndoableEdit.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/GlobalUndoableEdit.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/GlobalUndoableEdit.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/GlobalUndoableEdit.java Wed Dec 6 22:21:19 2017 @@ -19,6 +19,7 @@ package org.apache.jmeter.gui; import java.util.function.Consumer; + import javax.swing.undo.AbstractUndoableEdit; import javax.swing.undo.CannotRedoException; import javax.swing.undo.CannotUndoException; Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistoryItem.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistoryItem.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistoryItem.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistoryItem.java Wed Dec 6 22:21:19 2017 @@ -18,10 +18,10 @@ package org.apache.jmeter.gui; -import org.apache.jorphan.collections.HashTree; - import java.io.Serializable; + import org.apache.jmeter.engine.TreeCloner; +import org.apache.jorphan.collections.HashTree; /** * Undo history item Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/RemoteStart.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RemoteStart.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/RemoteStart.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/RemoteStart.java Wed Dec 6 22:21:19 2017 @@ -26,6 +26,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.StringTokenizer; + import org.apache.jmeter.JMeter; import org.apache.jmeter.engine.DistributedRunner; import org.apache.jmeter.gui.GuiPackage; Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/HorizontalPanel.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/HorizontalPanel.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/HorizontalPanel.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/HorizontalPanel.java Wed Dec 6 22:21:19 2017 @@ -22,8 +22,8 @@ */ package org.apache.jmeter.gui.util; -import java.awt.Color; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Component; import javax.swing.Box; Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java Wed Dec 6 22:21:19 2017 @@ -22,6 +22,7 @@ import java.awt.Component; import java.awt.HeadlessException; import java.io.IOException; import java.io.Serializable; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; @@ -55,6 +56,7 @@ import org.apache.jmeter.testbeans.gui.T import org.apache.jmeter.testelement.NonTestElement; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.TestPlan; +import org.apache.jmeter.threads.AbstractThreadGroup; import org.apache.jmeter.util.JMeterUtils; import org.apache.jmeter.visualizers.Printable; import org.apache.jorphan.gui.GuiUtils; @@ -614,51 +616,38 @@ public final class MenuFactory { * @return whether it is OK to add the dragged nodes to this parent */ public static boolean canAddTo(JMeterTreeNode parentNode, JMeterTreeNode[] nodes) { - if (null == parentNode) { - return false; - } - if (foundClass(nodes, new Class[]{TestPlan.class})){// Can't add a TestPlan anywhere + if (parentNode == null + || foundClass(nodes, new Class[]{TestPlan.class})) { return false; } TestElement parent = parentNode.getTestElement(); // Force TestFragment to only be pastable under a Test Plan - if (foundClass(nodes, new Class[]{org.apache.jmeter.control.TestFragmentController.class})){ - if (parent instanceof TestPlan) { - return true; - } - return false; + if (foundClass(nodes, new Class[]{TestFragmentController.class})) { + return parent instanceof TestPlan; } // Cannot move Non-Test Elements from root of Test Plan or Test Fragment - if (!(parent instanceof TestPlan || parent instanceof TestFragmentController) - && foundMenuCategories(nodes, NON_TEST_ELEMENTS)) { + if (foundMenuCategories(nodes, NON_TEST_ELEMENTS) + && !(parent instanceof TestPlan || parent instanceof TestFragmentController)) { return false; } if (parent instanceof TestPlan) { - if (foundClass(nodes, - new Class[]{Sampler.class, Controller.class}, // Samplers and Controllers need not apply ... - new Class[]{org.apache.jmeter.threads.AbstractThreadGroup.class, - NonTestElement.class - }) // but AbstractThreadGroup (Controller) and Non Test Elements are OK - ){ - return false; - } - return true; + return !foundClass( + nodes, + new Class[]{Sampler.class, Controller.class}, // Samplers and Controllers need not apply ... + new Class[]{AbstractThreadGroup.class, NonTestElement.class}); } // AbstractThreadGroup is only allowed under a TestPlan - if (foundClass(nodes, new Class[]{org.apache.jmeter.threads.AbstractThreadGroup.class})){ + if (foundClass(nodes, new Class[]{AbstractThreadGroup.class})) { return false; } if (parent instanceof Controller) {// Includes thread group; anything goes return true; } if (parent instanceof Sampler) {// Samplers and Controllers need not apply ... - if (foundClass(nodes, new Class[]{Sampler.class, Controller.class})){ - return false; - } - return true; + return !foundClass(nodes, new Class[]{Sampler.class, Controller.class}); } // All other @@ -689,14 +678,9 @@ public final class MenuFactory { * @return true if nodes is in category */ private static boolean foundMenuCategories(JMeterTreeNode[] nodes, String category) { - for (JMeterTreeNode node : nodes) { - for (String c : node.getMenuCategories()) { - if (category.equals(c)) { - return true; - } - } - } - return false; + return Arrays.stream(nodes) + .flatMap(node -> node.getMenuCategories().stream()) + .anyMatch(category::equals); } /** @@ -787,8 +771,8 @@ public final class MenuFactory { * [This is so Thread Group appears before setUp and tearDown] */ private static void sortPluginMenus() { - for(Entry<String, List<MenuInfo>> me : menuMap.entrySet()){ - Collections.sort(me.getValue(), new MenuInfoComparator(!me.getKey().equals(THREADS))); + for (Entry<String, List<MenuInfo>> me : menuMap.entrySet()) { + me.getValue().sort(new MenuInfoComparator(!me.getKey().equals(THREADS))); } } } Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/PowerTableModel.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/PowerTableModel.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/PowerTableModel.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/PowerTableModel.java Wed Dec 6 22:21:19 2017 @@ -21,6 +21,7 @@ package org.apache.jmeter.gui.util; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.swing.event.TableModelEvent; @@ -149,13 +150,11 @@ public class PowerTableModel extends Def public Object[] getRowData(int row) { Object[] rowData = new Object[getColumnCount()]; - for (int i = 0; i < rowData.length; i++) { - rowData[i] = model.getColumnValue(i, row); - } + Arrays.setAll(rowData, i -> model.getColumnValue(i, row)); return rowData; } - private Object createDefaultValue(int i) { + private Object createDefaultValue(int i) { // CHECKSTYLE IGNORE ReturnCount Class<?> colClass = getColumnClass(i); try { return colClass.newInstance(); Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/VerticalPanel.java Wed Dec 6 22:21:19 2017 @@ -18,8 +18,8 @@ package org.apache.jmeter.gui.util; -import java.awt.Color; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Component; import javax.swing.Box; Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/theme/darcula_theme.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/theme/darcula_theme.xml?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/theme/darcula_theme.xml (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/theme/darcula_theme.xml Wed Dec 6 22:21:19 2017 @@ -17,77 +17,77 @@ --> <!DOCTYPE RSyntaxTheme SYSTEM "theme.dtd"> <!-- - Theme that mimics IntelliJ IDEA's defaults. - See theme.dtd and org.fife.ui.rsyntaxtextarea.Theme for more information. + Theme that mimics IntelliJ IDEA's defaults. + See theme.dtd and org.fife.ui.rsyntaxtextarea.Theme for more information. --> <RSyntaxTheme version="1.0"> - <!-- Omitting baseFont will use a system-appropriate monospaced. --> - <!--<baseFont family="..." size="13"/>--> - - <!-- General editor colors. --> - <background color="2B2B2B" /> - <caret color="bbbbbb" /> - <selection fg="D0D0D0" bg="214283" /> - <currentLineHighlight color="323232" fade="false" /> - <marginLine fg="b0b4b9" /> - <markAllHighlight color="ccccff" /> - <markOccurrencesHighlight color="ccccff" border="false" /> - <matchedBracket fg="D8D8D8" bg="D8D8D8" highlightBoth="true" animate="false" /> - <hyperlinks fg="6897BB" /> - <secondaryLanguages> - <language index="1" bg="fff0cc" /> - <language index="2" bg="dafeda" /> - <language index="3" bg="ffe0f0" /> - </secondaryLanguages> - - <!-- Gutter styling. --> - <gutterBorder color="dddddd" /> - <lineNumbers fg="D0D0D0" /> - <foldIndicator fg="808080" iconBg="ffffff" /> - <iconRowHeader activeLineRange="3399ff" /> - - <!-- Syntax tokens. --> - <tokenStyles> - <style token="IDENTIFIER" fg="BED6FF" /> - <style token="RESERVED_WORD" fg="CC7832" bold="true" /> - <style token="RESERVED_WORD_2" fg="A9B7C6" bold="true" /> - <style token="ANNOTATION" fg="808000" /> - <style token="COMMENT_DOCUMENTATION" fg="84B977" italic="true" /> - <style token="COMMENT_EOL" fg="808080" italic="true" /> - <style token="COMMENT_MULTILINE" fg="629755" italic="true" /> - <style token="COMMENT_KEYWORD" fg="84B977" bold="true" underline="true" italic="true" /> - <style token="COMMENT_MARKUP" fg="84B977" bg="e2ffe2" italic="true" /> - <style token="DATA_TYPE" fg="BFA4A4" bold="true" italic="true"/> - <style token="FUNCTION" fg="FFC66D" /> - <style token="LITERAL_BOOLEAN" fg="CC7832" bold="true" /> - <style token="LITERAL_NUMBER_DECIMAL_INT" fg="6897BB" /> - <style token="LITERAL_NUMBER_FLOAT" fg="6897BB" /> - <style token="LITERAL_NUMBER_HEXADECIMAL" fg="6897BB" /> - <style token="LITERAL_STRING_DOUBLE_QUOTE" fg="008000" bold="false" /> - <style token="LITERAL_CHAR" fg="008000" bold="false" /> - <style token="LITERAL_BACKQUOTE" fg="008000" bold="true" /> - <style token="MARKUP_TAG_DELIMITER" fg="D8D8D8" bold="true" /> - <style token="MARKUP_TAG_NAME" fg="CC7832" bold="true" /> - <style token="MARKUP_TAG_ATTRIBUTE" fg="6897BB" bold="true" /> - <style token="MARKUP_TAG_ATTRIBUTE_VALUE" fg="008000" bold="true" /> - <style token="MARKUP_COMMENT" fg="808080" italic="true"/> - <style token="MARKUP_DTD" fg="808080"/> - <style token="MARKUP_PROCESSING_INSTRUCTION" fg="808080"/> - <style token="MARKUP_CDATA" fg="cc6600"/> - <style token="MARKUP_CDATA_DELIMITER" fg="008080"/> - <style token="MARKUP_ENTITY_REFERENCE" fg="008000"/> - <style token="OPERATOR" fg="D8D8D8" /> - <style token="PREPROCESSOR" fg="808080" /> - <style token="REGEX" fg="008040" /> - <style token="SEPARATOR" fg="D8D8D8" /> - <style token="VARIABLE" fg="810ca8" bold="true" /> - <style token="WHITESPACE" fg="000000" /> - - <style token="ERROR_IDENTIFIER" fg="ff0000" /> - <style token="ERROR_NUMBER_FORMAT" fg="ff0000" /> - <style token="ERROR_STRING_DOUBLE" fg="ff0000" /> - <style token="ERROR_CHAR" fg="ff0000" /> - </tokenStyles> + <!-- Omitting baseFont will use a system-appropriate monospaced. --> + <!--<baseFont family="..." size="13"/>--> -</RSyntaxTheme> \ No newline at end of file + <!-- General editor colors. --> + <background color="2B2B2B"/> + <caret color="bbbbbb"/> + <selection fg="D0D0D0" bg="214283"/> + <currentLineHighlight color="323232" fade="false"/> + <marginLine fg="b0b4b9"/> + <markAllHighlight color="ccccff"/> + <markOccurrencesHighlight color="ccccff" border="false"/> + <matchedBracket fg="D8D8D8" bg="D8D8D8" highlightBoth="true" animate="false"/> + <hyperlinks fg="6897BB"/> + <secondaryLanguages> + <language index="1" bg="fff0cc"/> + <language index="2" bg="dafeda"/> + <language index="3" bg="ffe0f0"/> + </secondaryLanguages> + + <!-- Gutter styling. --> + <gutterBorder color="dddddd"/> + <lineNumbers fg="D0D0D0"/> + <foldIndicator fg="808080" iconBg="ffffff"/> + <iconRowHeader activeLineRange="3399ff"/> + + <!-- Syntax tokens. --> + <tokenStyles> + <style token="IDENTIFIER" fg="BED6FF"/> + <style token="RESERVED_WORD" fg="CC7832" bold="true"/> + <style token="RESERVED_WORD_2" fg="A9B7C6" bold="true"/> + <style token="ANNOTATION" fg="808000"/> + <style token="COMMENT_DOCUMENTATION" fg="84B977" italic="true"/> + <style token="COMMENT_EOL" fg="808080" italic="true"/> + <style token="COMMENT_MULTILINE" fg="629755" italic="true"/> + <style token="COMMENT_KEYWORD" fg="84B977" bold="true" underline="true" italic="true"/> + <style token="COMMENT_MARKUP" fg="84B977" bg="e2ffe2" italic="true"/> + <style token="DATA_TYPE" fg="BFA4A4" bold="true" italic="true"/> + <style token="FUNCTION" fg="FFC66D"/> + <style token="LITERAL_BOOLEAN" fg="CC7832" bold="true"/> + <style token="LITERAL_NUMBER_DECIMAL_INT" fg="6897BB"/> + <style token="LITERAL_NUMBER_FLOAT" fg="6897BB"/> + <style token="LITERAL_NUMBER_HEXADECIMAL" fg="6897BB"/> + <style token="LITERAL_STRING_DOUBLE_QUOTE" fg="008000" bold="false"/> + <style token="LITERAL_CHAR" fg="008000" bold="false"/> + <style token="LITERAL_BACKQUOTE" fg="008000" bold="true"/> + <style token="MARKUP_TAG_DELIMITER" fg="D8D8D8" bold="true"/> + <style token="MARKUP_TAG_NAME" fg="CC7832" bold="true"/> + <style token="MARKUP_TAG_ATTRIBUTE" fg="6897BB" bold="true"/> + <style token="MARKUP_TAG_ATTRIBUTE_VALUE" fg="008000" bold="true"/> + <style token="MARKUP_COMMENT" fg="808080" italic="true"/> + <style token="MARKUP_DTD" fg="808080"/> + <style token="MARKUP_PROCESSING_INSTRUCTION" fg="808080"/> + <style token="MARKUP_CDATA" fg="cc6600"/> + <style token="MARKUP_CDATA_DELIMITER" fg="008080"/> + <style token="MARKUP_ENTITY_REFERENCE" fg="008000"/> + <style token="OPERATOR" fg="D8D8D8"/> + <style token="PREPROCESSOR" fg="808080"/> + <style token="REGEX" fg="008040"/> + <style token="SEPARATOR" fg="D8D8D8"/> + <style token="VARIABLE" fg="810ca8" bold="true"/> + <style token="WHITESPACE" fg="000000"/> + + <style token="ERROR_IDENTIFIER" fg="ff0000"/> + <style token="ERROR_NUMBER_FORMAT" fg="ff0000"/> + <style token="ERROR_STRING_DOUBLE" fg="ff0000"/> + <style token="ERROR_CHAR" fg="ff0000"/> + </tokenStyles> + +</RSyntaxTheme> Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java Wed Dec 6 22:21:19 2017 @@ -23,9 +23,6 @@ import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.Locale; -import org.apache.jmeter.report.core.Sample; -import org.apache.jmeter.report.core.SampleMetadata; - /** * This class is meant to simplify the building of samples. * <p> Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java Wed Dec 6 22:21:19 2017 @@ -17,8 +17,6 @@ */ package org.apache.jmeter.report.core; -import org.apache.jmeter.report.core.SampleMetadata; - /** * Simple parser to get a {@link SampleMetadata} instance<br> * Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleWriter.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleWriter.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleWriter.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleWriter.java Wed Dec 6 22:21:19 2017 @@ -19,8 +19,6 @@ package org.apache.jmeter.report.core; import java.io.Closeable; -import org.apache.jmeter.report.core.Sample; - /** * Describes sample writer basic operations.<br> * <br> Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java Wed Dec 6 22:21:19 2017 @@ -23,12 +23,12 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.StandardCharsets; -import java.nio.file.StandardCopyOption; import java.nio.file.FileAlreadyExistsException; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.SimpleFileVisitor; +import java.nio.file.StandardCopyOption; import java.nio.file.attribute.BasicFileAttributes; import org.apache.commons.io.FileUtils; Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java Wed Dec 6 22:21:19 2017 @@ -19,7 +19,6 @@ package org.apache.jmeter.report.process import org.apache.jmeter.report.core.Sample; import org.apache.jmeter.report.core.SamplePredicate; -import org.apache.jmeter.report.processor.AbstractSampleConsumer; /** * <p> Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java Wed Dec 6 22:21:19 2017 @@ -22,7 +22,6 @@ import java.util.ArrayList; import org.apache.jmeter.report.core.Sample; import org.apache.jmeter.report.core.SampleBuilder; import org.apache.jmeter.report.core.SampleMetadata; -import org.apache.jmeter.report.processor.AbstractSampleConsumer; /** * The Class TimeCountConsumer adds a data field to the samples it consumes. Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollectorHelper.java Wed Dec 6 22:21:19 2017 @@ -18,7 +18,6 @@ package org.apache.jmeter.reporters; -import org.apache.jmeter.reporters.ResultCollector; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.visualizers.Visualizer; Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/gui/ResultActionGui.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/gui/ResultActionGui.java?rev=1817321&r1=1817320&r2=1817321&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/reporters/gui/ResultActionGui.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/reporters/gui/ResultActionGui.java Wed Dec 6 22:21:19 2017 @@ -22,15 +22,14 @@ import java.awt.BorderLayout; import javax.swing.Box; -import org.apache.jmeter.reporters.ResultAction; import org.apache.jmeter.gui.OnErrorPanel; import org.apache.jmeter.processor.gui.AbstractPostProcessorGui; +import org.apache.jmeter.reporters.ResultAction; import org.apache.jmeter.testelement.OnErrorTestElement; import org.apache.jmeter.testelement.TestElement; /** * Create a Result Action Test Element - * */ public class ResultActionGui extends AbstractPostProcessorGui {