You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2017/05/01 10:56:16 UTC
Re: svn commit: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
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?
Scratching my head,
Felix
> found = true;
> log.debug("Adding {}", classpathElement);
> listPaths.add(classpathElement);
>@@ -470,4 +472,5 @@ public final class ClassFinder {
> }
> }
> }
>+
> }
Re: svn commit: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Posted by Philippe Mouawad <ph...@gmail.com>.
Thanks Felix, I didn't notice this :-)
On Mon, May 1, 2017 at 1:49 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:
> Am 01.05.2017 um 13:18 schrieb Philippe Mouawad:
>
>> Hi Felix,
>> Can you point me to what was wrong, I am blind this morning :-)
>>
> I thought I already did:
>
> if (currentStrPathOrJar != null &&
> classpathElement.endsWith(currentStrPathOrJar)) {
>
> instead of
>
> if (currentStrPathOrJar != null &&
> currentStrPathOrJar.endsWith(currentStrPathOrJar)) {
>
>
> look at the second part of the condition. Correct seems to be
> "classpathElement.endsWith" and not "currentStrPathOrJar.endsWith". The
> second condition would always be true.
>
> Felix
>
>
>
> Thanks
>>
>> On Mon, May 1, 2017 at 1:06 PM, Felix Schumacher <
>> felix.schumacher@internetallee.de> wrote:
>>
>>
>>> 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 {
>>>>>> }
>>>>>> }
>>>>>> }
>>>>>> +
>>>>>> }
>>>>>>
>>>>>
>>
>>
>
--
Cordialement.
Philippe Mouawad.
Re: svn commit: r1793304 -
/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 01.05.2017 um 13:18 schrieb Philippe Mouawad:
> Hi Felix,
> Can you point me to what was wrong, I am blind this morning :-)
I thought I already did:
if (currentStrPathOrJar != null &&
classpathElement.endsWith(currentStrPathOrJar)) {
instead of
if (currentStrPathOrJar != null &&
currentStrPathOrJar.endsWith(currentStrPathOrJar)) {
look at the second part of the condition. Correct seems to be
"classpathElement.endsWith" and not "currentStrPathOrJar.endsWith". The
second condition would always be true.
Felix
> Thanks
>
> On Mon, May 1, 2017 at 1:06 PM, Felix Schumacher <
> felix.schumacher@internetallee.de> wrote:
>
>>
>> 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 {
>>>>> }
>>>>> }
>>>>> }
>>>>> +
>>>>> }
>
>
Re: svn commit: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Felix,
Can you point me to what was wrong, I am blind this morning :-)
Thanks
On Mon, May 1, 2017 at 1:06 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:
>
>
> 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 {
> >> > }
> >> > }
> >> > }
> >> >+
> >> > }
> >>
>
--
Cordialement.
Philippe Mouawad.
Re: svn commit: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 1. Mai 2017 13:03:00 MESZ schrieb Philippe Mouawad <ph...@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 {
>> > }
>> > }
>> > }
>> >+
>> > }
>>
Re: svn commit: r1793304 - /jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
Posted by Philippe Mouawad <ph...@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 ?
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 {
> > }
> > }
> > }
> >+
> > }
>
--
Cordialement.
Philippe Mouawad.