View | Details | Raw Unified | Return to bug 57981
Collapse All | Expand All

(-)a/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java (-14 / +13 lines)
Lines 185-192 implements ChangeListener, ActionListener, ItemListener Link Here
185
            filter.setPackges(JOrphanUtils.split(filterpkg.getText(),",")); //$NON-NLS-1$
185
            filter.setPackges(JOrphanUtils.split(filterpkg.getText(),",")); //$NON-NLS-1$
186
            // change the classname drop down
186
            // change the classname drop down
187
            String[] clist = filter.filterArray(classList);
187
            String[] clist = filter.filterArray(classList);
188
            for (int idx=0; idx < clist.length; idx++) {
188
            for (String classStr : clist) {
189
                classnameCombo.addItem(clist[idx]);
189
                classnameCombo.addItem(classStr);
190
            }
190
            }
191
        }
191
        }
192
        catch (IOException e)
192
        catch (IOException e)
Lines 360-367 implements ChangeListener, ActionListener, ItemListener Link Here
360
                // Don't instantiate class
360
                // Don't instantiate class
361
                Class<?> testClass = Class.forName(className, false, contextClassLoader);
361
                Class<?> testClass = Class.forName(className, false, contextClassLoader);
362
                String [] names = getMethodNames(testClass);
362
                String [] names = getMethodNames(testClass);
363
                for (int idx=0; idx < names.length; idx++){
363
                for (String name : names) {
364
                    methodName.addItem(names[idx]);
364
                    methodName.addItem(name);
365
                }
365
                }
366
                methodName.repaint();
366
                methodName.repaint();
367
            } catch (ClassNotFoundException e) {
367
            } catch (ClassNotFoundException e) {
Lines 373-393 implements ChangeListener, ActionListener, ItemListener Link Here
373
    {
373
    {
374
        Method[] meths = clazz.getMethods();
374
        Method[] meths = clazz.getMethods();
375
        List<String> list = new ArrayList<>();
375
        List<String> list = new ArrayList<>();
376
        for (int idx=0; idx < meths.length; idx++){
376
        for (final Method method : meths) {
377
            final Method method = meths[idx];
378
            final String name = method.getName();
377
            final String name = method.getName();
379
            if (junit4.isSelected()){
378
            if (junit4.isSelected()) {
380
                if (method.isAnnotationPresent(Test.class) ||
379
                if (method.isAnnotationPresent(Test.class) ||
381
                    method.isAnnotationPresent(BeforeClass.class) ||
380
                        method.isAnnotationPresent(BeforeClass.class) ||
382
                    method.isAnnotationPresent(AfterClass.class)) {
381
                        method.isAnnotationPresent(AfterClass.class)) {
383
                        list.add(name);
382
                    list.add(name);
384
                }
383
                }
385
            } else {
384
            } else {
386
                if (name.startsWith(TESTMETHOD_PREFIX) ||
385
                if (name.startsWith(TESTMETHOD_PREFIX) ||
387
                    name.equals(ONETIMESETUP) ||
386
                        name.equals(ONETIMESETUP) ||
388
                    name.equals(ONETIMETEARDOWN) ||
387
                        name.equals(ONETIMETEARDOWN) ||
389
                    name.equals(SUITE)) {
388
                        name.equals(SUITE)) {
390
                        list.add(name);
389
                    list.add(name);
391
                }
390
                }
392
            }
391
            }
393
        }
392
        }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java (-12 / +11 lines)
Lines 122-130 public class MultipartUrlConfig implements Serializable { Link Here
122
     */
122
     */
123
    public void parseArguments(String queryString) {
123
    public void parseArguments(String queryString) {
124
        String[] parts = JOrphanUtils.split(queryString, "--" + getBoundary()); //$NON-NLS-1$
124
        String[] parts = JOrphanUtils.split(queryString, "--" + getBoundary()); //$NON-NLS-1$
125
        for (int i = 0; i < parts.length; i++) {
125
        for (String part : parts) {
126
            String contentDisposition = getHeaderValue("Content-disposition", parts[i]); //$NON-NLS-1$
126
            String contentDisposition = getHeaderValue("Content-disposition", part); //$NON-NLS-1$
127
            String contentType = getHeaderValue("Content-type", parts[i]); //$NON-NLS-1$
127
            String contentType = getHeaderValue("Content-type", part); //$NON-NLS-1$
128
            // Check if it is form data
128
            // Check if it is form data
129
            if (contentDisposition != null && contentDisposition.indexOf("form-data") > -1) { //$NON-NLS-1$
129
            if (contentDisposition != null && contentDisposition.indexOf("form-data") > -1) { //$NON-NLS-1$
130
                // Get the form field name
130
                // Get the form field name
Lines 138-149 public class MultipartUrlConfig implements Serializable { Link Here
138
                    // Get the filename
138
                    // Get the filename
139
                    index = contentDisposition.indexOf(filenamePrefix) + filenamePrefix.length();
139
                    index = contentDisposition.indexOf(filenamePrefix) + filenamePrefix.length();
140
                    String path = contentDisposition.substring(index, contentDisposition.indexOf('\"', index)); //$NON-NLS-1$
140
                    String path = contentDisposition.substring(index, contentDisposition.indexOf('\"', index)); //$NON-NLS-1$
141
                    if(path != null && path.length() > 0) {
141
                    if (path != null && path.length() > 0) {
142
                        // Set the values retrieved for the file upload
142
                        // Set the values retrieved for the file upload
143
                        files.addHTTPFileArg(path, name, contentType);
143
                        files.addHTTPFileArg(path, name, contentType);
144
                    }
144
                    }
145
                }
145
                } else {
146
                else {
147
                    // Find the first empty line of the multipart, it signals end of headers for multipart
146
                    // Find the first empty line of the multipart, it signals end of headers for multipart
148
                    // Agents are supposed to terminate lines in CRLF:
147
                    // Agents are supposed to terminate lines in CRLF:
149
                    final String CRLF = "\r\n";
148
                    final String CRLF = "\r\n";
Lines 151-163 public class MultipartUrlConfig implements Serializable { Link Here
151
                    // Code also allows for LF only (not sure why - perhaps because the test code uses it?)
150
                    // Code also allows for LF only (not sure why - perhaps because the test code uses it?)
152
                    final String LF = "\n";
151
                    final String LF = "\n";
153
                    final String LFLF = "\n\n";
152
                    final String LFLF = "\n\n";
154
                    int indexEmptyCrLfCrLfLinePos = parts[i].indexOf(CRLFCRLF); //$NON-NLS-1$
153
                    int indexEmptyCrLfCrLfLinePos = part.indexOf(CRLFCRLF); //$NON-NLS-1$
155
                    int indexEmptyLfLfLinePos = parts[i].indexOf(LFLF); //$NON-NLS-1$
154
                    int indexEmptyLfLfLinePos = part.indexOf(LFLF); //$NON-NLS-1$
156
                    String value = null;
155
                    String value = null;
157
                    if(indexEmptyCrLfCrLfLinePos > -1) {// CRLF blank line found
156
                    if (indexEmptyCrLfCrLfLinePos > -1) {// CRLF blank line found
158
                        value = parts[i].substring(indexEmptyCrLfCrLfLinePos+CRLFCRLF.length(),parts[i].lastIndexOf(CRLF));
157
                        value = part.substring(indexEmptyCrLfCrLfLinePos + CRLFCRLF.length(), part.lastIndexOf(CRLF));
159
                    } else if(indexEmptyLfLfLinePos > -1) { // LF blank line found
158
                    } else if (indexEmptyLfLfLinePos > -1) { // LF blank line found
160
                        value = parts[i].substring(indexEmptyLfLfLinePos+LFLF.length(),parts[i].lastIndexOf(LF));
159
                        value = part.substring(indexEmptyLfLfLinePos + LFLF.length(), part.lastIndexOf(LF));
161
                    }
160
                    }
162
                    this.addNonEncodedArgument(name, value);
161
                    this.addNonEncodedArgument(name, value);
163
                }
162
                }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (-3 / +2 lines)
Lines 549-557 public class Proxy extends Thread { Link Here
549
            headerLines[contentLengthIndex]=HTTPConstants.HEADER_CONTENT_LENGTH+": "+res.getResponseData().length;
549
            headerLines[contentLengthIndex]=HTTPConstants.HEADER_CONTENT_LENGTH+": "+res.getResponseData().length;
550
        }
550
        }
551
        StringBuilder sb = new StringBuilder(headers.length());
551
        StringBuilder sb = new StringBuilder(headers.length());
552
        for (int i=0;i<headerLines.length;i++){
552
        for (String line : headerLines) {
553
            String line=headerLines[i];
553
            if (line != null) {
554
            if (line != null){
555
                sb.append(line).append(CRLF_STRING);
554
                sb.append(line).append(CRLF_STRING);
556
            }
555
            }
557
        }
556
        }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java (-13 / +11 lines)
Lines 1196-1204 public class ProxyControl extends GenericController { Link Here
1196
                continue; // go on with next property.
1196
                continue; // go on with next property.
1197
            }
1197
            }
1198
1198
1199
            for (Iterator<ConfigTestElement> configs = configurations.iterator(); configs.hasNext();) {
1199
            for (ConfigTestElement config : configurations) {
1200
                ConfigTestElement config = configs.next();
1201
1202
                String configValue = config.getPropertyAsString(name);
1200
                String configValue = config.getPropertyAsString(name);
1203
1201
1204
                if (configValue != null && configValue.length() > 0) {
1202
                if (configValue != null && configValue.length() > 0) {
Lines 1258-1270 public class ProxyControl extends GenericController { Link Here
1258
    private void replaceValues(TestElement sampler, TestElement[] configs, Collection<Arguments> variables) {
1256
    private void replaceValues(TestElement sampler, TestElement[] configs, Collection<Arguments> variables) {
1259
        // Build the replacer from all the variables in the collection:
1257
        // Build the replacer from all the variables in the collection:
1260
        ValueReplacer replacer = new ValueReplacer();
1258
        ValueReplacer replacer = new ValueReplacer();
1261
        for (Iterator<Arguments> vars = variables.iterator(); vars.hasNext();) {
1259
        for (Arguments variable : variables) {
1262
            final Map<String, String> map = vars.next().getArgumentsAsMap();
1260
            final Map<String, String> map = variable.getArgumentsAsMap();
1263
            for (Iterator<String> vals = map.values().iterator(); vals.hasNext();){
1261
            for (Iterator<String> vals = map.values().iterator(); vals.hasNext(); ) {
1264
               final Object next = vals.next();
1262
                final Object next = vals.next();
1265
               if ("".equals(next)) {// Drop any empty values (Bug 45199)
1263
                if ("".equals(next)) {// Drop any empty values (Bug 45199)
1266
                   vals.remove();
1264
                    vals.remove();
1267
               }
1265
                }
1268
            }
1266
            }
1269
            replacer.addVariables(map);
1267
            replacer.addVariables(map);
1270
        }
1268
        }
Lines 1272-1280 public class ProxyControl extends GenericController { Link Here
1272
        try {
1270
        try {
1273
            boolean cachedRegexpMatch = regexMatch;
1271
            boolean cachedRegexpMatch = regexMatch;
1274
            replacer.reverseReplace(sampler, cachedRegexpMatch);
1272
            replacer.reverseReplace(sampler, cachedRegexpMatch);
1275
            for (int i = 0; i < configs.length; i++) {
1273
            for (TestElement config : configs) {
1276
                if (configs[i] != null) {
1274
                if (config != null) {
1277
                    replacer.reverseReplace(configs[i], cachedRegexpMatch);
1275
                    replacer.reverseReplace(config, cachedRegexpMatch);
1278
                }
1276
                }
1279
            }
1277
            }
1280
        } catch (InvalidVariableException e) {
1278
        } catch (InvalidVariableException e) {
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java (-5 / +1 lines)
Lines 288-298 public class ProxyControlGui extends LogicControllerGui implements JMeterGUIComp Link Here
288
288
289
    private List<String> getDataList(PowerTableModel p_model, String colName) {
289
    private List<String> getDataList(PowerTableModel p_model, String colName) {
290
        String[] dataArray = p_model.getData().getColumn(colName);
290
        String[] dataArray = p_model.getData().getColumn(colName);
291
        List<String> list = new LinkedList<>();
291
        return new LinkedList<>(Arrays.asList(dataArray));
292
        for (int i = 0; i < dataArray.length; i++) {
293
            list.add(dataArray[i]);
294
        }
295
        return list;
296
    }
292
    }
297
293
298
    /** {@inheritDoc} */
294
    /** {@inheritDoc} */
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java (-13 / +12 lines)
Lines 385-392 public class HTTPHC3Impl extends HTTPHCAbstractImpl { Link Here
385
    private static int calculateHeadersSize(HttpMethodBase httpMethod) {
385
    private static int calculateHeadersSize(HttpMethodBase httpMethod) {
386
        int headerSize = httpMethod.getStatusLine().toString().length()+2; // add a \r\n
386
        int headerSize = httpMethod.getStatusLine().toString().length()+2; // add a \r\n
387
        Header[] rh = httpMethod.getResponseHeaders();
387
        Header[] rh = httpMethod.getResponseHeaders();
388
        for (int i = 0; i < rh.length; i++) {
388
        for (Header responseHeader : rh) {
389
            headerSize += rh[i].toString().length(); // already include the \r\n
389
            headerSize += responseHeader.toString().length(); // already include the \r\n
390
        }
390
        }
391
        headerSize += 2; // last \r\n before response data
391
        headerSize += 2; // last \r\n before response data
392
        return headerSize;
392
        return headerSize;
Lines 574-584 public class HTTPHC3Impl extends HTTPHCAbstractImpl { Link Here
574
        headerBuf.append(method.getStatusLine());// header[0] is not the status line...
574
        headerBuf.append(method.getStatusLine());// header[0] is not the status line...
575
        headerBuf.append("\n"); // $NON-NLS-1$
575
        headerBuf.append("\n"); // $NON-NLS-1$
576
576
577
        for (int i = 0; i < rh.length; i++) {
577
        for (Header responseHeader : rh) {
578
            String key = rh[i].getName();
578
            String key = responseHeader.getName();
579
            headerBuf.append(key);
579
            headerBuf.append(key);
580
            headerBuf.append(": "); // $NON-NLS-1$
580
            headerBuf.append(": "); // $NON-NLS-1$
581
            headerBuf.append(rh[i].getValue());
581
            headerBuf.append(responseHeader.getValue());
582
            headerBuf.append("\n"); // $NON-NLS-1$
582
            headerBuf.append("\n"); // $NON-NLS-1$
583
        }
583
        }
584
        return headerBuf.toString();
584
        return headerBuf.toString();
Lines 660-671 public class HTTPHC3Impl extends HTTPHCAbstractImpl { Link Here
660
        // Get all the request headers
660
        // Get all the request headers
661
        StringBuilder hdrs = new StringBuilder(100);
661
        StringBuilder hdrs = new StringBuilder(100);
662
        Header[] requestHeaders = method.getRequestHeaders();
662
        Header[] requestHeaders = method.getRequestHeaders();
663
        for(int i = 0; i < requestHeaders.length; i++) {
663
        for (Header requestHeader : requestHeaders) {
664
            // Exclude the COOKIE header, since cookie is reported separately in the sample
664
            // Exclude the COOKIE header, since cookie is reported separately in the sample
665
            if(!HTTPConstants.HEADER_COOKIE.equalsIgnoreCase(requestHeaders[i].getName())) {
665
            if (!HTTPConstants.HEADER_COOKIE.equalsIgnoreCase(requestHeader.getName())) {
666
                hdrs.append(requestHeaders[i].getName());
666
                hdrs.append(requestHeader.getName());
667
                hdrs.append(": "); // $NON-NLS-1$
667
                hdrs.append(": "); // $NON-NLS-1$
668
                hdrs.append(requestHeaders[i].getValue());
668
                hdrs.append(requestHeader.getValue());
669
                hdrs.append("\n"); // $NON-NLS-1$
669
                hdrs.append("\n"); // $NON-NLS-1$
670
            }
670
            }
671
        }
671
        }
Lines 770-777 public class HTTPHC3Impl extends HTTPHCAbstractImpl { Link Here
770
            }
770
            }
771
771
772
            // Add any files
772
            // Add any files
773
            for (int i=0; i < files.length; i++) {
773
            for (HTTPFileArg file : files) {
774
                HTTPFileArg file = files[i];
775
                File inputFile = FileServer.getFileServer().getResolvedFile(file.getPath());
774
                File inputFile = FileServer.getFileServer().getResolvedFile(file.getPath());
776
                // We do not know the char set of the file to be uploaded, so we set it to null
775
                // We do not know the char set of the file to be uploaded, so we set it to null
777
                ViewableFilePart filePart = new ViewableFilePart(file.getParamName(), inputFile, file.getMimeType(), null);
776
                ViewableFilePart filePart = new ViewableFilePart(file.getParamName(), inputFile, file.getMimeType(), null);
Lines 1102-1109 public class HTTPHC3Impl extends HTTPHCAbstractImpl { Link Here
1102
    protected void saveConnectionCookies(HttpMethod method, URL u, CookieManager cookieManager) {
1101
    protected void saveConnectionCookies(HttpMethod method, URL u, CookieManager cookieManager) {
1103
        if (cookieManager != null) {
1102
        if (cookieManager != null) {
1104
            Header hdr[] = method.getResponseHeaders(HTTPConstants.HEADER_SET_COOKIE);
1103
            Header hdr[] = method.getResponseHeaders(HTTPConstants.HEADER_SET_COOKIE);
1105
            for (int i = 0; i < hdr.length; i++) {
1104
            for (Header responseHeader : hdr) {
1106
                cookieManager.addCookieFromHeader(hdr[i].getValue(),u);
1105
                cookieManager.addCookieFromHeader(responseHeader.getValue(), u);
1107
            }
1106
            }
1108
        }
1107
        }
1109
    }
1108
    }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (-7 / +7 lines)
Lines 824-833 public class HTTPHC4Impl extends HTTPHCAbstractImpl { Link Here
824
        headerBuf.append(response.getStatusLine());// header[0] is not the status line...
824
        headerBuf.append(response.getStatusLine());// header[0] is not the status line...
825
        headerBuf.append("\n"); // $NON-NLS-1$
825
        headerBuf.append("\n"); // $NON-NLS-1$
826
826
827
        for (int i = 0; i < rh.length; i++) {
827
        for (Header responseHeader : rh) {
828
            headerBuf.append(rh[i].getName());
828
            headerBuf.append(responseHeader.getName());
829
            headerBuf.append(": "); // $NON-NLS-1$
829
            headerBuf.append(": "); // $NON-NLS-1$
830
            headerBuf.append(rh[i].getValue());
830
            headerBuf.append(responseHeader.getValue());
831
            headerBuf.append("\n"); // $NON-NLS-1$
831
            headerBuf.append("\n"); // $NON-NLS-1$
832
        }
832
        }
833
        return headerBuf.toString();
833
        return headerBuf.toString();
Lines 936-947 public class HTTPHC4Impl extends HTTPHCAbstractImpl { Link Here
936
            // Get all the request headers
936
            // Get all the request headers
937
            StringBuilder hdrs = new StringBuilder(100);
937
            StringBuilder hdrs = new StringBuilder(100);
938
            Header[] requestHeaders = method.getAllHeaders();
938
            Header[] requestHeaders = method.getAllHeaders();
939
            for(int i = 0; i < requestHeaders.length; i++) {
939
            for (Header requestHeader : requestHeaders) {
940
                // Exclude the COOKIE header, since cookie is reported separately in the sample
940
                // Exclude the COOKIE header, since cookie is reported separately in the sample
941
                if(!HTTPConstants.HEADER_COOKIE.equalsIgnoreCase(requestHeaders[i].getName())) {
941
                if (!HTTPConstants.HEADER_COOKIE.equalsIgnoreCase(requestHeader.getName())) {
942
                    hdrs.append(requestHeaders[i].getName());
942
                    hdrs.append(requestHeader.getName());
943
                    hdrs.append(": "); // $NON-NLS-1$
943
                    hdrs.append(": "); // $NON-NLS-1$
944
                    hdrs.append(requestHeaders[i].getValue());
944
                    hdrs.append(requestHeader.getValue());
945
                    hdrs.append("\n"); // $NON-NLS-1$
945
                    hdrs.append("\n"); // $NON-NLS-1$
946
                }
946
                }
947
            }
947
            }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java (-3 / +3 lines)
Lines 102-111 public class HTTPSampleResult extends SampleResult { Link Here
102
         * 305 = Use Proxy
102
         * 305 = Use Proxy
103
         * 306 = (Unused)
103
         * 306 = (Unused)
104
         */
104
         */
105
        final String[] REDIRECT_CODES = { "301", "302", "303" };
105
        final String[] redirectCodes = { "301", "302", "303" };
106
        String code = getResponseCode();
106
        String code = getResponseCode();
107
        for (int i = 0; i < REDIRECT_CODES.length; i++) {
107
        for (String redirectCode : redirectCodes) {
108
            if (REDIRECT_CODES[i].equals(code)) {
108
            if (redirectCode.equals(code)) {
109
                return true;
109
                return true;
110
            }
110
            }
111
        }
111
        }
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (-33 / +29 lines)
Lines 307-329 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
307
307
308
    static{
308
    static{
309
        String []parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);// returns empty array for null
309
        String []parsers = JOrphanUtils.split(RESPONSE_PARSERS, " " , true);// returns empty array for null
310
        for (int i=0;i<parsers.length;i++){
310
        for (final String parser : parsers) {
311
            final String parser = parsers[i];
311
            String classname = JMeterUtils.getProperty(parser + ".className");//$NON-NLS-1$
312
            String classname=JMeterUtils.getProperty(parser+".className");//$NON-NLS-1$
312
            if (classname == null) {
313
            if (classname == null){
313
                log.info("Cannot find .className property for " + parser + ", using default");
314
                log.info("Cannot find .className property for "+parser+", using default");
314
                classname = "";
315
                classname="";
316
            }
315
            }
317
            String typelist=JMeterUtils.getProperty(parser+".types");//$NON-NLS-1$
316
            String typelist = JMeterUtils.getProperty(parser + ".types");//$NON-NLS-1$
318
            if (typelist != null){
317
            if (typelist != null) {
319
                String []types=JOrphanUtils.split(typelist, " " , true);
318
                String[] types = JOrphanUtils.split(typelist, " ", true);
320
                for (int j=0;j<types.length;j++){
319
                for (final String type : types) {
321
                    final String type = types[j];
320
                    log.info("Parser for " + type + " is " + classname);
322
                    log.info("Parser for "+type+" is "+classname);
321
                    parsersForType.put(type, classname);
323
                    parsersForType.put(type,classname);
324
                }
322
                }
325
            } else {
323
            } else {
326
                log.warn("Cannot find .types property for "+parser);
324
                log.warn("Cannot find .types property for " + parser);
327
            }
325
            }
328
        }
326
        }
329
        if (parsers.length==0){ // revert to previous behaviour
327
        if (parsers.length==0){ // revert to previous behaviour
Lines 1060-1068 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
1060
    public void parseArguments(String queryString, String contentEncoding) {
1058
    public void parseArguments(String queryString, String contentEncoding) {
1061
        String[] args = JOrphanUtils.split(queryString, QRY_SEP);
1059
        String[] args = JOrphanUtils.split(queryString, QRY_SEP);
1062
        final boolean isDebug = log.isDebugEnabled();
1060
        final boolean isDebug = log.isDebugEnabled();
1063
        for (int i = 0; i < args.length; i++) {
1061
        for (String arg : args) {
1064
            if (isDebug) {
1062
            if (isDebug) {
1065
                log.debug("Arg: " + args[i]);
1063
                log.debug("Arg: " + arg);
1066
            }
1064
            }
1067
            // need to handle four cases:
1065
            // need to handle four cases:
1068
            // - string contains name=value
1066
            // - string contains name=value
Lines 1073-1100 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
1073
            String metaData; // records the existance of an equal sign
1071
            String metaData; // records the existance of an equal sign
1074
            String name;
1072
            String name;
1075
            String value;
1073
            String value;
1076
            int length = args[i].length();
1074
            int length = arg.length();
1077
            int endOfNameIndex = args[i].indexOf(ARG_VAL_SEP);
1075
            int endOfNameIndex = arg.indexOf(ARG_VAL_SEP);
1078
            if (endOfNameIndex != -1) {// is there a separator?
1076
            if (endOfNameIndex != -1) {// is there a separator?
1079
                // case of name=value, name=
1077
                // case of name=value, name=
1080
                metaData = ARG_VAL_SEP;
1078
                metaData = ARG_VAL_SEP;
1081
                name = args[i].substring(0, endOfNameIndex);
1079
                name = arg.substring(0, endOfNameIndex);
1082
                value = args[i].substring(endOfNameIndex + 1, length);
1080
                value = arg.substring(endOfNameIndex + 1, length);
1083
            } else {
1081
            } else {
1084
                metaData = "";
1082
                metaData = "";
1085
                name=args[i];
1083
                name = arg;
1086
                value="";
1084
                value = "";
1087
            }
1085
            }
1088
            if (name.length() > 0) {
1086
            if (name.length() > 0) {
1089
                if (isDebug) {
1087
                if (isDebug) {
1090
                    log.debug("Name: " + name+ " Value: " + value+ " Metadata: " + metaData);
1088
                    log.debug("Name: " + name + " Value: " + value + " Metadata: " + metaData);
1091
                }
1089
                }
1092
                // If we know the encoding, we can decode the argument value,
1090
                // If we know the encoding, we can decode the argument value,
1093
                // to make it easier to read for the user
1091
                // to make it easier to read for the user
1094
                if(!StringUtils.isEmpty(contentEncoding)) {
1092
                if (!StringUtils.isEmpty(contentEncoding)) {
1095
                    addEncodedArgument(name, value, metaData, contentEncoding);
1093
                    addEncodedArgument(name, value, metaData, contentEncoding);
1096
                }
1094
                } else {
1097
                else {
1098
                    // If we do not know the encoding, we just use the encoded value
1095
                    // If we do not know the encoding, we just use the encoded value
1099
                    // The browser has already done the encoding, so save the values as is
1096
                    // The browser has already done the encoding, so save the values as is
1100
                    addNonEncodedArgument(name, value, metaData);
1097
                    addNonEncodedArgument(name, value, metaData);
Lines 1533-1540 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
1533
            }
1530
            }
1534
            if (lastRes.getSubResults() != null && lastRes.getSubResults().length > 0) {
1531
            if (lastRes.getSubResults() != null && lastRes.getSubResults().length > 0) {
1535
                SampleResult[] subs = lastRes.getSubResults();
1532
                SampleResult[] subs = lastRes.getSubResults();
1536
                for (int i = 0; i < subs.length; i++) {
1533
                for (SampleResult sub : subs) {
1537
                    totalRes.addSubResult(subs[i]);
1534
                    totalRes.addSubResult(sub);
1538
                }
1535
                }
1539
            } else {
1536
            } else {
1540
                // Only add sample if it is a sample of valid url redirect, i.e. that
1537
                // Only add sample if it is a sample of valid url redirect, i.e. that
Lines 1695-1703 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
1695
        HTTPFileArgs fileArgs = new HTTPFileArgs();
1692
        HTTPFileArgs fileArgs = new HTTPFileArgs();
1696
        // Weed out the empty files
1693
        // Weed out the empty files
1697
        if (files.length > 0) {
1694
        if (files.length > 0) {
1698
            for(int i=0; i < files.length; i++){
1695
            for (HTTPFileArg file : files) {
1699
                HTTPFileArg file = files[i];
1696
                if (file.isNotEmpty()) {
1700
                if (file.isNotEmpty()){
1701
                    fileArgs.addHTTPFileArg(file);
1697
                    fileArgs.addHTTPFileArg(file);
1702
                }
1698
                }
1703
            }
1699
            }
Lines 1834-1841 public abstract class HTTPSamplerBase extends AbstractSampler Link Here
1834
            // Now deal with any additional file arguments
1830
            // Now deal with any additional file arguments
1835
            if(fileArgs != null) {
1831
            if(fileArgs != null) {
1836
                HTTPFileArg[] infiles = fileArgs.asArray();
1832
                HTTPFileArg[] infiles = fileArgs.asArray();
1837
                for (int i = 0; i < infiles.length; i++){
1833
                for (HTTPFileArg infile : infiles) {
1838
                    allFileArgs.addHTTPFileArg(infiles[i]);
1834
                    allFileArgs.addHTTPFileArg(infile);
1839
                }
1835
                }
1840
            }
1836
            }
1841
        } else {
1837
        } else {
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java (-7 / +7 lines)
Lines 267-275 public class WSDLHelper { Link Here
267
     * @return list of web methods
267
     * @return list of web methods
268
     */
268
     */
269
    public String[] getWebMethods() {
269
    public String[] getWebMethods() {
270
        for (int idx = 0; idx < SOAPOPS.length; idx++) {
270
        for (Object soapOp : SOAPOPS) {
271
            // get the node
271
            // get the node
272
            Node act = (Node) SOAPOPS[idx];
272
            Node act = (Node) soapOp;
273
            // get the soap:operation
273
            // get the soap:operation
274
            NodeList opers = ((Element) act).getElementsByTagNameNS(SOAP11_BINDING_NAMESPACE, "operation");
274
            NodeList opers = ((Element) act).getElementsByTagNameNS(SOAP11_BINDING_NAMESPACE, "operation");
275
            if (opers.getLength() == 0) {
275
            if (opers.getLength() == 0) {
Lines 360-367 public class WSDLHelper { Link Here
360
        Object[] res = this.getSOAPBindings();
360
        Object[] res = this.getSOAPBindings();
361
        List<Element> ops = new ArrayList<>();
361
        List<Element> ops = new ArrayList<>();
362
        // first we iterate through the bindings
362
        // first we iterate through the bindings
363
        for (int idx = 0; idx < res.length; idx++) {
363
        for (Object r : res) {
364
            Element one = (Element) res[idx];
364
            Element one = (Element) r;
365
            NodeList opnodes = one.getElementsByTagNameNS(WSDL_NAMESPACE, "operation");
365
            NodeList opnodes = one.getElementsByTagNameNS(WSDL_NAMESPACE, "operation");
366
            // now we iterate through the operations
366
            // now we iterate through the operations
367
            for (int idz = 0; idz < opnodes.getLength(); idz++) {
367
            for (int idz = 0; idz < opnodes.getLength(); idz++) {
Lines 370-376 public class WSDLHelper { Link Here
370
                Element child = (Element) opnodes.item(idz);
370
                Element child = (Element) opnodes.item(idz);
371
                int numberOfSoapOperationNodes = child.getElementsByTagNameNS(SOAP11_BINDING_NAMESPACE, "operation").getLength()
371
                int numberOfSoapOperationNodes = child.getElementsByTagNameNS(SOAP11_BINDING_NAMESPACE, "operation").getLength()
372
                        + child.getElementsByTagNameNS(SOAP12_BINDING_NAMESPACE, "operation").getLength();
372
                        + child.getElementsByTagNameNS(SOAP12_BINDING_NAMESPACE, "operation").getLength();
373
                if (numberOfSoapOperationNodes>0) {
373
                if (numberOfSoapOperationNodes > 0) {
374
                    ops.add(child);
374
                    ops.add(child);
375
                }
375
                }
376
            }
376
            }
Lines 411-418 public class WSDLHelper { Link Here
411
            help.parse();
411
            help.parse();
412
            String[] methods = help.getWebMethods();
412
            String[] methods = help.getWebMethods();
413
            System.out.println("el: " + (System.currentTimeMillis() - start));
413
            System.out.println("el: " + (System.currentTimeMillis() - start));
414
            for (int idx = 0; idx < methods.length; idx++) {
414
            for (String method : methods) {
415
                System.out.println("method name: " + methods[idx]);
415
                System.out.println("method name: " + method);
416
            }
416
            }
417
            System.out.println("service url: " + help.getBinding());
417
            System.out.println("service url: " + help.getBinding());
418
            System.out.println("protocol: " + help.getProtocol());
418
            System.out.println("protocol: " + help.getProtocol());
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java (-12 / +12 lines)
Lines 178-185 public class LogFilter implements Filter, Serializable { Link Here
178
            this.PTRNFILTER = true;
178
            this.PTRNFILTER = true;
179
            // now we create the compiled pattern and
179
            // now we create the compiled pattern and
180
            // add it to the arraylist
180
            // add it to the arraylist
181
            for (int idx = 0; idx < INCPTRN.length; idx++) {
181
            for (String includePattern : INCPTRN) {
182
                this.INCPATTERNS.add(this.createPattern(INCPTRN[idx]));
182
                this.INCPATTERNS.add(this.createPattern(includePattern));
183
            }
183
            }
184
        }
184
        }
185
    }
185
    }
Lines 201-208 public class LogFilter implements Filter, Serializable { Link Here
201
            this.PTRNFILTER = true;
201
            this.PTRNFILTER = true;
202
            // now we create the compiled pattern and
202
            // now we create the compiled pattern and
203
            // add it to the arraylist
203
            // add it to the arraylist
204
            for (int idx = 0; idx < EXCPTRN.length; idx++) {
204
            for (String excludePattern : EXCPTRN) {
205
                this.EXCPATTERNS.add(this.createPattern(EXCPTRN[idx]));
205
                this.EXCPATTERNS.add(this.createPattern(excludePattern));
206
            }
206
            }
207
        }
207
        }
208
    }
208
    }
Lines 270-277 public class LogFilter implements Filter, Serializable { Link Here
270
        // usefile is set to false unless it
270
        // usefile is set to false unless it
271
        // matches.
271
        // matches.
272
        this.USEFILE = false;
272
        this.USEFILE = false;
273
        for (int idx = 0; idx < this.INCFILE.length; idx++) {
273
        for (String includeFile : this.INCFILE) {
274
            if (text.indexOf(this.INCFILE[idx]) > -1) {
274
            if (text.contains(includeFile)) {
275
                this.USEFILE = true;
275
                this.USEFILE = true;
276
                break;
276
                break;
277
            }
277
            }
Lines 295-302 public class LogFilter implements Filter, Serializable { Link Here
295
        // it matches.
295
        // it matches.
296
        this.USEFILE = true;
296
        this.USEFILE = true;
297
        boolean exc = false;
297
        boolean exc = false;
298
        for (int idx = 0; idx < this.EXCFILE.length; idx++) {
298
        for (String excludeFile : this.EXCFILE) {
299
            if (text.indexOf(this.EXCFILE[idx]) > -1) {
299
            if (text.contains(excludeFile)) {
300
                exc = true;
300
                exc = true;
301
                this.USEFILE = false;
301
                this.USEFILE = false;
302
                break;
302
                break;
Lines 332-339 public class LogFilter implements Filter, Serializable { Link Here
332
     */
332
     */
333
    protected boolean incPattern(String text) {
333
    protected boolean incPattern(String text) {
334
        this.USEFILE = false;
334
        this.USEFILE = false;
335
        for (int idx = 0; idx < this.INCPATTERNS.size(); idx++) {
335
        for (Pattern includePattern : this.INCPATTERNS) {
336
            if (JMeterUtils.getMatcher().contains(text, this.INCPATTERNS.get(idx))) {
336
            if (JMeterUtils.getMatcher().contains(text, includePattern)) {
337
                this.USEFILE = true;
337
                this.USEFILE = true;
338
                break;
338
                break;
339
            }
339
            }
Lines 351-358 public class LogFilter implements Filter, Serializable { Link Here
351
    protected boolean excPattern(String text) {
351
    protected boolean excPattern(String text) {
352
        this.USEFILE = true;
352
        this.USEFILE = true;
353
        boolean exc = false;
353
        boolean exc = false;
354
        for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++) {
354
        for (Pattern excludePattern : this.EXCPATTERNS) {
355
            if (JMeterUtils.getMatcher().contains(text, this.EXCPATTERNS.get(idx))) {
355
            if (JMeterUtils.getMatcher().contains(text, excludePattern)) {
356
                exc = true;
356
                exc = true;
357
                this.USEFILE = false;
357
                this.USEFILE = false;
358
                break;
358
                break;
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/StandardGenerator.java (-2 / +2 lines)
Lines 152-159 public class StandardGenerator implements Generator, Serializable { Link Here
152
     */
152
     */
153
    @Override
153
    @Override
154
    public void setParams(NVPair[] params) {
154
    public void setParams(NVPair[] params) {
155
        for (int idx = 0; idx < params.length; idx++) {
155
        for (NVPair param : params) {
156
            SAMPLE.addArgument(params[idx].getName(), params[idx].getValue());
156
            SAMPLE.addArgument(param.getName(), param.getValue());
157
        }
157
        }
158
    }
158
    }
159
159
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java (-3 / +2 lines)
Lines 209-217 public class RequestViewHTTP implements RequestView { Link Here
209
            }
209
            }
210
            // Parsed request headers
210
            // Parsed request headers
211
            LinkedHashMap<String, String> lhm = JMeterUtils.parseHeaders(sampleResult.getRequestHeaders());
211
            LinkedHashMap<String, String> lhm = JMeterUtils.parseHeaders(sampleResult.getRequestHeaders());
212
            for (Iterator<Map.Entry<String, String>> iterator = lhm.entrySet().iterator(); iterator.hasNext();) {
212
            for (Entry<String, String> entry : lhm.entrySet()) {
213
                Map.Entry<String, String> entry = iterator.next();
213
                headersModel.addRow(new RowResult(entry.getKey(), entry.getValue()));
214
                headersModel.addRow(new RowResult(entry.getKey(), entry.getValue()));   
215
            }
214
            }
216
215
217
        } else {
216
        } else {
(-)a/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java (-35 / +27 lines)
Lines 899-907 public class LDAPExtSampler extends AbstractSampler implements TestStateListener Link Here
899
899
900
            sortResults(sortedResults);
900
            sortResults(sortedResults);
901
901
902
            for (Iterator<SearchResult> it = sortedResults.iterator(); it.hasNext();)
902
            for (final SearchResult sr : sortedResults) {
903
            {
904
                final SearchResult  sr = it.next();
905
                writeSearchResult(sr, xmlb);
903
                writeSearchResult(sr, xmlb);
906
            }
904
            }
907
        }
905
        }
Lines 934-971 public class LDAPExtSampler extends AbstractSampler implements TestStateListener Link Here
934
                sortedAttrs.add(attr);
932
                sortedAttrs.add(attr);
935
            }
933
            }
936
            sortAttributes(sortedAttrs);
934
            sortAttributes(sortedAttrs);
937
            for (Iterator<Attribute> ait = sortedAttrs.iterator(); ait.hasNext();)
935
             for (final Attribute attr : sortedAttrs) {
938
            {
936
                 StringBuilder sb = new StringBuilder();
939
                final Attribute     attr = ait.next();
937
                 if (attr.size() == 1) {
940
938
                     sb.append(getWriteValue(attr.get()));
941
                StringBuilder sb = new StringBuilder();
939
                 } else {
942
                if (attr.size() == 1) {
940
                     final ArrayList<String> sortedVals = new ArrayList<>(attr.size());
943
                    sb.append(getWriteValue(attr.get()));
941
                     boolean first = true;
944
                } else {
942
945
                    final ArrayList<String>     sortedVals = new ArrayList<>(attr.size());
943
                     for (NamingEnumeration<?> ven = attr.getAll(); ven.hasMore(); ) {
946
                    boolean             first = true;
944
                         final Object value = getWriteValue(ven.next());
947
945
                         sortedVals.add(value.toString());
948
                    for (NamingEnumeration<?> ven = attr.getAll(); ven.hasMore(); )
946
                     }
949
                    {
947
950
                        final Object    value = getWriteValue(ven.next());
948
                     Collections.sort(sortedVals);
951
                        sortedVals.add(value.toString());
949
952
                    }
950
                     for (final String value : sortedVals) {
953
951
                         if (first) {
954
                    Collections.sort(sortedVals);
952
                             first = false;
955
953
                         } else {
956
                    for (Iterator<String> vit = sortedVals.iterator(); vit.hasNext();)
954
                             sb.append(", "); // $NON-NLS-1$
957
                    {
955
                         }
958
                        final String    value = vit.next();
956
                         sb.append(value);
959
                        if (first) {
957
                     }
960
                            first = false;
958
                 }
961
                        } else {
959
                 xmlb.tag(attr.getID(), sb);
962
                            sb.append(", "); // $NON-NLS-1$
960
             }
963
                        }
964
                        sb.append(value);
965
                    }
966
                }
967
                xmlb.tag(attr.getID(),sb);
968
            }
969
        } finally {
961
        } finally {
970
             xmlb.closeTag("attributes"); // $NON-NLS-1$
962
             xmlb.closeTag("attributes"); // $NON-NLS-1$
971
            xmlb.closeTag("searchresult"); // $NON-NLS-1$
963
            xmlb.closeTag("searchresult"); // $NON-NLS-1$
(-)a/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java (-2 / +1 lines)
Lines 498-505 public class SmtpPanel extends JPanel { Link Here
498
    public CollectionProperty getHeaderFields() {
498
    public CollectionProperty getHeaderFields() {
499
        CollectionProperty result = new CollectionProperty();
499
        CollectionProperty result = new CollectionProperty();
500
        result.setName(SmtpSampler.HEADER_FIELDS);
500
        result.setName(SmtpSampler.HEADER_FIELDS);
501
        for (Iterator<JTextField> iterator = headerFields.keySet().iterator(); iterator.hasNext();) {
501
        for (JTextField headerName : headerFields.keySet()) {
502
            JTextField headerName = iterator.next();
503
            String name = headerName.getText();
502
            String name = headerName.getText();
504
            String value = headerFields.get(headerName).getText();
503
            String value = headerFields.get(headerName).getText();
505
            Argument argument = new Argument(name, value);
504
            Argument argument = new Argument(name, value);
(-)a/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java (-5 / +5 lines)
Lines 259-271 public class TestHTMLParser extends JMeterTestCase { Link Here
259
            suite.addTest(new TestHTMLParser("testNotParser"));
259
            suite.addTest(new TestHTMLParser("testNotParser"));
260
            suite.addTest(new TestHTMLParser("testNotCreatable"));
260
            suite.addTest(new TestHTMLParser("testNotCreatable"));
261
            suite.addTest(new TestHTMLParser("testNotCreatableStatic"));
261
            suite.addTest(new TestHTMLParser("testNotCreatableStatic"));
262
            for (int i = 0; i < PARSERS.length; i++) {
262
            for (String parser : PARSERS) {
263
                TestSuite ps = new TestSuite(PARSERS[i]);// Identify subtests
263
                TestSuite ps = new TestSuite(parser);// Identify subtests
264
                ps.addTest(new TestHTMLParser("testParserProperty", PARSERS[i], 0));
264
                ps.addTest(new TestHTMLParser("testParserProperty", parser, 0));
265
                for (int j = 0; j < TESTS.length; j++) {
265
                for (int j = 0; j < TESTS.length; j++) {
266
                    TestSuite ts = new TestSuite(TESTS[j].fileName);
266
                    TestSuite ts = new TestSuite(TESTS[j].fileName);
267
                    ts.addTest(new TestHTMLParser("testParserSet", PARSERS[i], j));
267
                    ts.addTest(new TestHTMLParser("testParserSet", parser, j));
268
                    ts.addTest(new TestHTMLParser("testParserList", PARSERS[i], j));
268
                    ts.addTest(new TestHTMLParser("testParserList", parser, j));
269
                    ps.addTest(ts);
269
                    ps.addTest(ts);
270
                }
270
                }
271
                suite.addTest(ps);
271
                suite.addTest(ps);
(-)a/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java (-12 / +8 lines)
Lines 89-100 public class TestLogFilter extends JMeterTestCase { Link Here
89
89
90
        public void testExcludeFiles() {
90
        public void testExcludeFiles() {
91
            testf.excludeFiles(INCL);
91
            testf.excludeFiles(INCL);
92
            for (int idx = 0; idx < TESTDATA.length; idx++) {
92
            for (TestData td : TESTDATA) {
93
                TestData td = TESTDATA[idx];
94
                String theFile = td.file;
93
                String theFile = td.file;
95
                boolean expect = td.exclfile;
94
                boolean expect = td.exclfile;
96
95
97
                testf.isFiltered(theFile,null);
96
                testf.isFiltered(theFile, null);
98
                String line = testf.filter(theFile);
97
                String line = testf.filter(theFile);
99
                if (line != null) {
98
                if (line != null) {
100
                    assertTrue("Expect to accept " + theFile, expect);
99
                    assertTrue("Expect to accept " + theFile, expect);
Lines 106-117 public class TestLogFilter extends JMeterTestCase { Link Here
106
105
107
        public void testIncludeFiles() {
106
        public void testIncludeFiles() {
108
            testf.includeFiles(INCL);
107
            testf.includeFiles(INCL);
109
            for (int idx = 0; idx < TESTDATA.length; idx++) {
108
            for (TestData td : TESTDATA) {
110
                TestData td = TESTDATA[idx];
111
                String theFile = td.file;
109
                String theFile = td.file;
112
                boolean expect = td.inclfile;
110
                boolean expect = td.inclfile;
113
111
114
                testf.isFiltered(theFile,null);
112
                testf.isFiltered(theFile, null);
115
                String line = testf.filter(theFile);
113
                String line = testf.filter(theFile);
116
                if (line != null) {
114
                if (line != null) {
117
                    assertTrue("Expect to accept " + theFile, expect);
115
                    assertTrue("Expect to accept " + theFile, expect);
Lines 124-135 public class TestLogFilter extends JMeterTestCase { Link Here
124
122
125
        public void testExcludePattern() {
123
        public void testExcludePattern() {
126
            testf.excludePattern(PATTERNS);
124
            testf.excludePattern(PATTERNS);
127
            for (int idx = 0; idx < TESTDATA.length; idx++) {
125
            for (TestData td : TESTDATA) {
128
                TestData td = TESTDATA[idx];
129
                String theFile = td.file;
126
                String theFile = td.file;
130
                boolean expect = td.exclpatt;
127
                boolean expect = td.exclpatt;
131
128
132
                assertEquals(!expect, testf.isFiltered(theFile,null));
129
                assertEquals(!expect, testf.isFiltered(theFile, null));
133
                String line = testf.filter(theFile);
130
                String line = testf.filter(theFile);
134
                if (line != null) {
131
                if (line != null) {
135
                    assertTrue("Expect to accept " + theFile, expect);
132
                    assertTrue("Expect to accept " + theFile, expect);
Lines 141-152 public class TestLogFilter extends JMeterTestCase { Link Here
141
138
142
        public void testIncludePattern() {
139
        public void testIncludePattern() {
143
            testf.includePattern(PATTERNS);
140
            testf.includePattern(PATTERNS);
144
            for (int idx = 0; idx < TESTDATA.length; idx++) {
141
            for (TestData td : TESTDATA) {
145
                TestData td = TESTDATA[idx];
146
                String theFile = td.file;
142
                String theFile = td.file;
147
                boolean expect = td.inclpatt;
143
                boolean expect = td.inclpatt;
148
144
149
                assertEquals(!expect, testf.isFiltered(theFile,null));
145
                assertEquals(!expect, testf.isFiltered(theFile, null));
150
                String line = testf.filter(theFile);
146
                String line = testf.filter(theFile);
151
                if (line != null) {
147
                if (line != null) {
152
                    assertTrue("Expect to accept " + theFile, expect);
148
                    assertTrue("Expect to accept " + theFile, expect);
(-)a/test/src/org/apache/jorphan/test/AllTests.java (-4 / +3 lines)
Lines 170-179 public final class AllTests { Link Here
170
        String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);
170
        String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);
171
        StringBuilder sb = new StringBuilder(3000);
171
        StringBuilder sb = new StringBuilder(3000);
172
        sb.append("java.class.path=");
172
        sb.append("java.class.path=");
173
        for (int i = 0; i < cpe.length; i++) {
173
        for (String path : cpe) {
174
            sb.append("\n");
174
            sb.append("\n");
175
            sb.append(cpe[i]);
175
            sb.append(path);
176
            if (new java.io.File(cpe[i]).exists()) {
176
            if (new File(path).exists()) {
177
                sb.append(" - OK");
177
                sb.append(" - OK");
178
            } else {
178
            } else {
179
                sb.append(" - ??");
179
                sb.append(" - ??");
180
- 

Return to bug 57981