Github user ra0077 commented on the pull request:

    https://github.com/apache/jmeter/pull/162#issuecomment-196740857
  
    I have swap it and remove formating to be easy to read it
    
    What I do is:
    check if the user have put a file name
    if not
    log it to allow easy debuging
    stop the test
    if yes
    no modification
    
    
    It allow to easy debug (a clear message in log) and avoid to have an
    exception to user
    
    
    
    The diff with the trunk:
    
    --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
    +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
    @@ -146,6 +146,11 @@ public class CSVDataSet extends ConfigTestElement
    
         @Override
         public void iterationStart(LoopIterationEvent iterEvent) {
    +        String _fileName = getFilename();
    +        if (_fileName.isEmpty()) {
    +            log.error("No filename setup in CSV Data Set Config:
    "+this.getName());
    +            throw new JMeterStopThreadException("No filename setup in CSV
    Data Set Config: "+this.getName());
    +        } else {
             FileServer server = FileServer.getFileServer();
             final JMeterContext context = getThreadContext();
             String delim = getDelimiter();
    @@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
                 delim=",";
             }
             if (vars == null) {
    -            String _fileName = getFilename();
                 String mode = getShareMode();
                 int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
                 switch(modeInt){
    @@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
                     threadVars.put(var, EOFVALUE);
                 }
             }
    +        }
         }
    
    Antonio
    
    Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
    www.avast.com
    
<https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A>
    <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
    
    2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov <notificati...@github.com>:
    
    > I don't have modify these lines.
    >
    > @ra0077 <https://github.com/ra0077>, can you please rework the PR without
    > reformatting the whole method?
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly or view it on GitHub:
    > https://github.com/apache/jmeter/pull/162#issuecomment-196710977
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to