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: r1840762 - /jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
Date Thu, 13 Sep 2018 10:20:02 GMT


Am 13. September 2018 12:11:31 MESZ schrieb sebb <sebbaz@gmail.com>:
>On 13 September 2018 at 10:56, Felix Schumacher
><felix.schumacher@internetallee.de> wrote:
>>
>>
>> Am 13. September 2018 11:41:56 MESZ schrieb sebb <sebbaz@gmail.com>:
>>>On 13 September 2018 at 05:25, Felix Schumacher
>>><felix.schumacher@internetallee.de> wrote:
>>>>
>>>>
>>>> Am 12. September 2018 23:52:19 MESZ schrieb sebb@apache.org:
>>>>>Author: sebb
>>>>>Date: Wed Sep 12 21:52:19 2018
>>>>>New Revision: 1840762
>>>>>
>>>>>URL: http://svn.apache.org/viewvc?rev=1840762&view=rev
>>>>>Log:
>>>>>Fix up log messages to show correct information; use better name
>for
>>>>>variable which only applies to Groovy; fix typo
>>>>>
>>>>>Modified:
>>>>>    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
>>>>>
>>>>>Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
>>>>>URL:
>>>>>http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1840762&r1=1840761&r2=1840762&view=diff
>>>>>==============================================================================
>>>>>--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
>>>>>+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Wed Sep 12
>>>>>21:52:19 2018
>>>>>@@ -675,10 +675,10 @@ public class JMeter implements JMeterPlu
>>>>>         }
>>>>>
>>>>>         // Should we run a Groovy script on startup?
>>>>>-        String jsr223Init =
>>>>>JMeterUtils.getProperty("groovy.init.file");// $NON-NLS-1$
>>>>>-        if (jsr223Init != null){
>>>>>-            log.info("Running Groovy init script in file: {}",
>>>>>jsr223Init);
>>>>>-            File file = new File(jsr223Init);
>>>>>+        String groovyInit =
>>>>>JMeterUtils.getProperty("groovy.init.file");// $NON-NLS-1$
>>>>>+        if (groovyInit != null){
>>>>>+            log.info("Running Groovy init script in file: {}",
>>>>>groovyInit);
>>>>>+            File file = new File(groovyInit);
>>>>>             if(file.exists() && file.canRead()) {
>>>>>                 try (FileReader reader = new FileReader(file)) {
>>>>>   ScriptEngineManager scriptEngineManager = new
>>>ScriptEngineManager();
>>>>>@@ -692,10 +692,10 @@ public class JMeter implements JMeterPlu
>>>>>bindings.put("OUT", System.out); // NOSONAR $NON-NLS-1$ (this name
>is
>>>>>fixed)
>>>>>                     engine.eval(reader, bindings);
>>>>>                 } catch (IOException | ScriptException ex) {
>>>>>-                    log.error("Error running init script
>referenced
>>>by
>>>>>property {}", jsr223Init, ex);
>>>>>+                    log.error("Error running init script {}: {}",
>>>>>groovyInit, ex);
>>>>>                 }
>>>>>             } else {
>>>>>-                log.error("Script {}Â referenced by property {}Â
>is
>>>>>not readable or does not exists", file.getAbsolutePath(),
>>>jsr223Init);
>>>>>+                log.error("Script {}Â referenced by property {}Â
>is
>>>>
>>>> Looks like a non printable character hides in this log message.
>>>
>>>As can be seen from the diff, I did not change that part of the line.
>>>But I will fix it.
>>
>> I just wanted to point out that it is there, not that you hid it
>there. And I can fix it, but not before this evening.
>>
>> Sorry for the misleading text,
>
>No problem; I've already fixed it.
>
>Curiously the characters did not show up in the SVN CLI diff on my
>system; nor in Eclipse.
>They show as white-space. Perhaps it was a non-breaking space or
>similar.

I believe it is nbsp. 

>
>The problem was not noticed on the initial commit (presumably because
>that was quite long).
>Maybe we need to occasionally scan source files for non-ASCII
>characters?

I thought so, too.

In vim one can use listchars to highlight different whitespace characters. Will add 'nbsp'
to my local vim setup. 

Felix 

>
>>  Felix
>>
>>>
>>>> Regards,
>>>>  Felix
>>>>
>>>>>not readable or does not exist", file.getAbsolutePath(),
>>>>>"groovy.init.file");
>>>>>             }
>>>>>         }
>>>>>     }

Mime
View raw message