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: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Date Mon, 01 May 2017 11:06:33 GMT


Am 1. Mai 2017 13:03:00 MESZ schrieb Philippe Mouawad <philippe.mouawad@gmail.com>:
>On Mon, May 1, 2017 at 12:56 PM, Felix Schumacher <
>felix.schumacher@internetallee.de> wrote:
>
>>
>>
>> Am 1. Mai 2017 12:47:03 MESZ schrieb pmouawad@apache.org:
>> >Author: pmouawad
>> >Date: Mon May  1 10:47:03 2017
>> >New Revision: 1793304
>> >
>> >URL: http://svn.apache.org/viewvc?rev=1793304&view=rev
>> >Log:
>> >Fix test failure
>> >
>> >Modified:
>> >  
>jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
>> >
>> >Modified:
>> >jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
>> >URL:
>> >http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/
>> apache/jorphan/reflect/ClassFinder.java?rev=1793304&
>> r1=1793303&r2=1793304&view=diff
>> >===========================================================
>> ===================
>> >---
>> >jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
>> >(original)
>> >+++
>> >jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
>> >Mon May  1 10:47:03 2017
>> >@@ -311,14 +311,16 @@ public final class ClassFinder {
>> >         String classpathElement = null;
>> >         StringTokenizer classpathElements =
>> >                new StringTokenizer(javaClassPath,
>File.pathSeparator);
>> >+
>> >         while (classpathElements.hasMoreTokens()) {
>> >        classpathElement =
>fixPathEntry(classpathElements.nextToken());
>> >             if(classpathElement == null) {
>> >                 continue;
>> >             }
>> >             boolean found = false;
>> >-            for (String currentStrPathOrJar : strPathsOrJars) {
>> >-                if (currentStrPathOrJar != null &&
>> >currentStrPathOrJar.endsWith(currentStrPathOrJar)) {
>> >+            for (int i = 0; i < strPathsOrJars.size(); i++) {
>> >+                String currentStrPathOrJar = strPathsOrJars.get(i);
>> >+                if (currentStrPathOrJar != null &&
>> >classpathElement.endsWith(currentStrPathOrJar)) {
>>
>> Why did you change the for loop? Would it not have been enough to
>change
>> the condition?
>>
>
>What condition ?

currentStringPathOrJar.endsWith => class pathElement.endsWith 

Felix
>The issue seems to be in the  loop.
>I don't understand clearly why tests broke before.
>
>>
>> Scratching my head,
>>  Felix
>>
>> >                     found = true;
>> >                     log.debug("Adding {}", classpathElement);
>> >                     listPaths.add(classpathElement);
>> >@@ -470,4 +472,5 @@ public final class ClassFinder {
>> >             }
>> >         }
>> >     }
>> >+
>> > }
>>

Mime
View raw message