• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / httpunit / 389

12 Aug 2025 11:17PM UTC coverage: 80.48% (-0.02%) from 80.503%
389

push

github

hazendaz
Merge branch 'master' into javax

3216 of 4105 branches covered (78.34%)

Branch coverage included in aggregate %.

238 of 258 new or added lines in 68 files covered. (92.25%)

2 existing lines in 2 files now uncovered.

8254 of 10147 relevant lines covered (81.34%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.52
/src/main/java/com/meterware/httpunit/HttpUnitOptions.java
1
/*
2
 * MIT License
3
 *
4
 * Copyright 2011-2025 Russell Gold
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
8
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
9
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions
12
 * of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
15
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
17
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
 * DEALINGS IN THE SOFTWARE.
19
 */
20
package com.meterware.httpunit;
21

22
import com.meterware.httpunit.parsing.HTMLParserFactory;
23
import com.meterware.httpunit.parsing.HTMLParserListener;
24
import com.meterware.httpunit.scripting.ScriptableDelegate;
25
import com.meterware.httpunit.scripting.ScriptingEngineFactory;
26
import com.meterware.httpunit.scripting.ScriptingHandler;
27

28
import java.lang.reflect.InvocationTargetException;
29
import java.nio.charset.StandardCharsets;
30
import java.util.HashSet;
31
import java.util.Set;
32
import java.util.Vector;
33

34
/**
35
 * A collection of global options to control HttpUnit's behavior.
36
 *
37
 * @author <a href="mailto:russgold@httpunit.org">Russell Gold</a>
38
 * @author <a href="mailto:dglo@ssec.wisc.edu">Dave Glowacki</a>
39
 * @author <a href="mailto:bx@bigfoot.com">Benoit Xhenseval</a>
40
 **/
41
public abstract class HttpUnitOptions {
×
42
    public static final String ORIGINAL_SCRIPTING_ENGINE_FACTORY = "com.meterware.httpunit.javascript.JavaScriptEngineFactory";
43
    // comment out the scripting engine not to be used by allowing the appropriate number of asterisks in the comment on
44
    // the next line (1 or 2)
45
    /**/
46
    public static final String DEFAULT_SCRIPT_ENGINE_FACTORY = ORIGINAL_SCRIPTING_ENGINE_FACTORY;
47
    /*
48
     * / public static final String DEFAULT_SCRIPT_ENGINE_FACTORY = NEW_SCRIPTING_ENGINE_FACTORY; /
49
     */
50

51
    /**
52
     * Resets all options to their default values.
53
     */
54
    public static void reset() {
55
        _exceptionsOnErrorStatus = true;
1✔
56
        _parameterValuesValidated = true;
1✔
57
        _imagesTreatedAsAltText = false;
1✔
58
        _loggingHttpHeaders = false;
1✔
59
        _matchesIgnoreCase = true;
1✔
60
        _checkContentLength = false;
1✔
61
        _redirectDelay = 0; // TODO move this to ClientProperties
1✔
62
        _characterSet = StandardCharsets.ISO_8859_1.name();
1✔
63
        _contentType = DEFAULT_CONTENT_TYPE;
1✔
64
        _postIncludesCharset = false;
1✔
65
        _exceptionsThrownOnScriptError = true;
1✔
66
        _customAttributes = null;
1✔
67
        _javaScriptOptimizationLevel = -1;
1✔
68
        _checkHtmlContentType = false;
1✔
69
        setScriptEngineClassName(DEFAULT_SCRIPT_ENGINE_FACTORY);
1✔
70
        setScriptingEnabled(true);
1✔
71
    }
1✔
72

73
    /**
74
     * Returns true if HttpUnit is accepting and saving cookies. The default is to accept them.
75
     *
76
     * @deprecated as of 1.5.3, use ClientProperties#isAcceptCookies();
77
     */
78
    @Deprecated
79
    public static boolean isAcceptCookies() {
80
        return ClientProperties.getDefaultProperties().isAcceptCookies();
×
81
    }
82

83
    /**
84
     * Specifies whether HttpUnit should accept and send cookies.
85
     *
86
     * @deprecated as of 1.5.3, use ClientProperties#setAcceptCookies();
87
     */
88
    @Deprecated
89
    public static void setAcceptCookies(boolean acceptCookies) {
90
        ClientProperties.getDefaultProperties().setAcceptCookies(acceptCookies);
×
91
    }
×
92

93
    /**
94
     * Returns true if any WebClient created will accept GZIP encoding of responses. The default is to accept GZIP
95
     * encoding.
96
     *
97
     * @deprecated as of 1.5.3, use ClientProperties#isAcceptGzip();
98
     **/
99
    @Deprecated
100
    public static boolean isAcceptGzip() {
101
        return ClientProperties.getDefaultProperties().isAcceptGzip();
×
102
    }
103

104
    /**
105
     * Specifies whether a WebClient will be initialized to accept GZIP encoded responses. The default is true.
106
     *
107
     * @deprecated as of 1.5.3, use ClientProperties#setAcceptGzip();
108
     */
109
    @Deprecated
110
    public static void setAcceptGzip(boolean acceptGzip) {
111
        ClientProperties.getDefaultProperties().setAcceptGzip(acceptGzip);
×
112
    }
×
113

114
    /**
115
     * Resets the default character set to the HTTP default encoding.
116
     **/
117
    public static void resetDefaultCharacterSet() {
NEW
118
        _characterSet = StandardCharsets.ISO_8859_1.name();
×
119
    }
×
120

121
    /**
122
     * Resets the default content type to plain text.
123
     **/
124
    public static void resetDefaultContentType() {
125
        _contentType = DEFAULT_CONTENT_TYPE;
×
126
    }
×
127

128
    /**
129
     * Sets the default character set for pages which do not specify one and for requests created without HTML sources.
130
     * By default, HttpUnit uses the HTTP default encoding, ISO-8859-1.
131
     **/
132
    public static void setDefaultCharacterSet(String characterSet) {
133
        _characterSet = characterSet;
1✔
134
    }
1✔
135

136
    /**
137
     * Returns the character set to be used for pages which do not specify one.
138
     **/
139
    public static String getDefaultCharacterSet() {
140
        return _characterSet;
1✔
141
    }
142

143
    /**
144
     * Returns true if HttpUnit will throw an exception when a message is only partially received. The default is to
145
     * avoid such checks.
146
     */
147
    public static boolean isCheckContentLength() {
148
        return _checkContentLength;
1✔
149
    }
150

151
    /**
152
     * Specifies whether HttpUnit should throw an exception when the content length of a message does not match its
153
     * actual received length. Defaults to false.
154
     */
155
    public static void setCheckContentLength(boolean checkContentLength) {
156
        _checkContentLength = checkContentLength;
1✔
157
    }
1✔
158

159
    /**
160
     * Determines whether a normal POST request will include the character set in the content-type header. The default
161
     * is to include it; however, some older servlet engines (most notably Tomcat 3.1) get confused when they see it.
162
     **/
163
    public static void setPostIncludesCharset(boolean postIncludesCharset) {
164
        _postIncludesCharset = postIncludesCharset;
×
165
    }
×
166

167
    /**
168
     * Returns true if POST requests should include the character set in the content-type header.
169
     **/
170
    public static boolean isPostIncludesCharset() {
171
        return _postIncludesCharset;
1✔
172
    }
173

174
    /**
175
     * Sets the default content type for pages which do not specify one.
176
     **/
177
    public static void setDefaultContentType(String contentType) {
178
        _contentType = contentType;
×
179
    }
×
180

181
    /**
182
     * Returns the content type to be used for pages which do not specify one.
183
     **/
184
    public static String getDefaultContentType() {
185
        return _contentType;
×
186
    }
187

188
    /**
189
     * Returns true if parser warnings are enabled.
190
     *
191
     * @deprecated as of 1.5.2, use HTMLParserFactory#isParserWarningsEnabled
192
     **/
193
    @Deprecated
194
    public static boolean getParserWarningsEnabled() {
195
        return HTMLParserFactory.isParserWarningsEnabled();
×
196
    }
197

198
    /**
199
     * If true, tells the parser to display warning messages. The default is false (warnings are not shown).
200
     *
201
     * @deprecated as of 1.5.2, use HTMLParserFactory#setParserWarningsEnabled
202
     **/
203
    @Deprecated
204
    public static void setParserWarningsEnabled(boolean enabled) {
205
        HTMLParserFactory.setParserWarningsEnabled(enabled);
×
206
    }
×
207

208
    /**
209
     * If true, WebClient.getResponse throws an exception when it receives an error status. Defaults to true.
210
     **/
211
    public static void setExceptionsThrownOnErrorStatus(boolean enabled) {
212
        _exceptionsOnErrorStatus = enabled;
1✔
213
    }
1✔
214

215
    /**
216
     * Returns true if WebClient.getResponse throws exceptions when detected an error status.
217
     **/
218
    public static boolean getExceptionsThrownOnErrorStatus() {
219
        return _exceptionsOnErrorStatus;
1✔
220
    }
221

222
    /**
223
     * Returns true if form parameter settings are checked.
224
     *
225
     * @deprecated as of 1.6, use WebForm#newUnvalidatedRequest() to obtain a request without parameter validation.
226
     **/
227
    @Deprecated
228
    public static boolean getParameterValuesValidated() {
229
        return _parameterValuesValidated;
1✔
230
    }
231

232
    /**
233
     * If true, tells HttpUnit to throw an exception on any attempt to set a form parameter to a value which could not
234
     * be set via the browser. The default is true (parameters are validated).<br>
235
     * <b>Note:</b> this only applies to a WebRequest created after this setting is changed. A request created with this
236
     * option disabled will not only not be checked for correctness, its parameter submission order will not be
237
     * guaranteed, and changing parameters will not trigger Javascript onChange / onClick events.
238
     *
239
     * @deprecated as of 1.6, use WebForm#newUnvalidatedRequest() to obtain a request without parameter validation.
240
     **/
241
    @Deprecated
242
    public static void setParameterValuesValidated(boolean validated) {
243
        _parameterValuesValidated = validated;
1✔
244
    }
1✔
245

246
    /**
247
     * Returns true if images are treated as text, using their alt attributes.
248
     **/
249
    public static boolean getImagesTreatedAsAltText() {
250
        return _imagesTreatedAsAltText;
1✔
251
    }
252

253
    /**
254
     * If true, tells HttpUnit to treat images with alt attributes as though they were the text value of that attribute
255
     * in all searches and displays. The default is false (image text is generally ignored).
256
     **/
257
    public static void setImagesTreatedAsAltText(boolean asText) {
258
        _imagesTreatedAsAltText = asText;
1✔
259
    }
1✔
260

261
    /**
262
     * If true, text matches in methods such as {@link HTMLSegment#getLinkWith} are case insensitive. The default is
263
     * true (matches ignore case).
264
     **/
265
    public static boolean getMatchesIgnoreCase() {
266
        return _matchesIgnoreCase;
1✔
267
    }
268

269
    /**
270
     * If true, text matches in methods such as {@link HTMLSegment#getLinkWith} are case insensitive. The default is
271
     * true (matches ignore case).
272
     **/
273
    public static void setMatchesIgnoreCase(boolean ignoreCase) {
274
        _matchesIgnoreCase = ignoreCase;
×
275
    }
×
276

277
    /**
278
     * Returns true if HTTP headers are to be dumped to system output.
279
     **/
280
    public static boolean isLoggingHttpHeaders() {
281
        return _loggingHttpHeaders;
1✔
282
    }
283

284
    /**
285
     * If true, tells HttpUnit to log HTTP headers to system output. The default is false.
286
     **/
287
    public static void setLoggingHttpHeaders(boolean enabled) {
288
        _loggingHttpHeaders = enabled;
1✔
289
    }
1✔
290

291
    /**
292
     * Returns true if HttpUnit throws an exception when attempting to parse as HTML a response whose content type is
293
     * not HTML. The default is false (content type is ignored).
294
     **/
295
    public static boolean isCheckHtmlContentType() {
296
        return _checkHtmlContentType;
1✔
297
    }
298

299
    /**
300
     * If true, HttpUnit throws an exception when attempting to parse as HTML a response whose content type is not HTML.
301
     * The default is false (content type is ignored).
302
     **/
303
    public static void setCheckHtmlContentType(boolean checkHtmlContentType) {
304
        _checkHtmlContentType = checkHtmlContentType;
1✔
305
    }
1✔
306

307
    /**
308
     * Returns true if HttpUnit should automatically follow page redirect requests (status 3xx). By default, this is
309
     * true.
310
     *
311
     * @deprecated as of 1.5.3, use ClientProperties#isAutoRedirect();
312
     **/
313
    @Deprecated
314
    public static boolean getAutoRedirect() {
315
        return ClientProperties.getDefaultProperties().isAutoRedirect();
×
316
    }
317

318
    /**
319
     * Determines whether HttpUnit should automatically follow page redirect requests (status 3xx). By default, this is
320
     * true in order to simulate normal browser operation.
321
     *
322
     * @deprecated as of 1.5.3, use ClientProperties#setAutoRedirect();
323
     **/
324
    @Deprecated
325
    public static void setAutoRedirect(boolean autoRedirect) {
326
        ClientProperties.getDefaultProperties().setAutoRedirect(autoRedirect);
×
327
    }
×
328

329
    /**
330
     * Returns the delay, in milliseconds, before a redirect request is issues.
331
     **/
332
    public static int getRedirectDelay() {
333
        return _redirectDelay;
1✔
334
    }
335

336
    /**
337
     * Sets the delay, in milliseconds, before a redirect request is issued. This may be necessary if the server under
338
     * some cases where the server performs asynchronous processing which must be completed before the new request can
339
     * be handled properly, and is taking advantage of slower processing by most user agents. It almost always indicates
340
     * an error in the server design, and therefore the default delay is zero.
341
     **/
342
    public static void setRedirectDelay(int delayInMilliseconds) {
343
        _redirectDelay = delayInMilliseconds;
×
344
    }
×
345

346
    /**
347
     * Returns true if HttpUnit should automatically follow page refresh requests. By default, this is false, so that
348
     * programs can verify the redirect page presented to users before the browser switches to the new page.
349
     *
350
     * @deprecated as of 1.5.3, use ClientProperties#isAutoRefresh();
351
     **/
352
    @Deprecated
353
    public static boolean getAutoRefresh() {
354
        return ClientProperties.getDefaultProperties().isAutoRefresh();
×
355
    }
356

357
    /**
358
     * Specifies whether HttpUnit should automatically follow page refresh requests. By default, this is false, so that
359
     * programs can verify the redirect page presented to users before the browser switches to the new page. Setting
360
     * this to true can cause an infinite loop on pages that refresh themselves.
361
     *
362
     * @deprecated as of 1.5.3, use ClientProperties#setAutoRefresh();
363
     **/
364
    @Deprecated
365
    public static void setAutoRefresh(boolean autoRefresh) {
366
        ClientProperties.getDefaultProperties().setAutoRefresh(autoRefresh);
×
367
    }
×
368

369
    /**
370
     * Remove an Html error listener.
371
     *
372
     * @deprecated as of 1.5.2, use HTMLParserfactory#removeHTMLParserListener
373
     **/
374
    @Deprecated
375
    public static void removeHtmlErrorListener(HTMLParserListener el) {
376
        HTMLParserFactory.removeHTMLParserListener(el);
×
377
    }
×
378

379
    /**
380
     * Add an Html error listener.
381
     *
382
     * @deprecated as of 1.5.2, use HTMLParserfactory#addHTMLParserListener
383
     **/
384
    @Deprecated
385
    public static void addHtmlErrorListener(HTMLParserListener el) {
386
        HTMLParserFactory.addHTMLParserListener(el);
×
387
    }
×
388

389
    /**
390
     * Get the list of Html Error Listeners
391
     *
392
     * @deprecated as of 1.5.2, removed with no replacement
393
     **/
394
    @Deprecated
395
    public static Vector getHtmlErrorListeners() {
396
        return null;
×
397
    }
398

399
    public static String getScriptEngineClassName() {
400
        return _scriptEngineClassName;
×
401
    }
402

403
    public static void setScriptEngineClassName(String scriptEngineClassName) {
404
        if (_scriptEngineClassName == null || !_scriptEngineClassName.equals(scriptEngineClassName)) {
1!
405
            _scriptingEngine = null;
1✔
406
        }
407
        _scriptEngineClassName = scriptEngineClassName;
1✔
408
    }
1✔
409

410
    public static ScriptingEngineFactory getScriptingEngine() {
411
        if (_scriptingEngine == null) {
1✔
412
            try {
413
                Class factoryClass = Class.forName(_scriptEngineClassName);
1✔
414
                final ScriptingEngineFactory factory = (ScriptingEngineFactory) factoryClass.getDeclaredConstructor()
1✔
415
                        .newInstance();
1✔
416
                _scriptingEngine = factory.isEnabled() ? factory : NULL_SCRIPTING_ENGINE_FACTORY;
1!
417
                _scriptingEngine.setThrowExceptionsOnError(_exceptionsThrownOnScriptError);
1✔
418
            } catch (ClassNotFoundException e) {
×
419
                disableScripting(e, "Unable to find scripting engine factory class ");
×
420
            } catch (InstantiationException e) {
×
421
                disableScripting(e, "Unable to instantiate scripting engine factory class ");
×
422
            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
×
423
                    | NoSuchMethodException | SecurityException e) {
424
                disableScripting(e, "Unable to create scripting engine factory class ");
×
425
            }
1✔
426
        }
427
        return _scriptingEngine;
1✔
428
    }
429

430
    /**
431
     * change the scriptingEnabled flag
432
     *
433
     * @param scriptingEnabled
434
     */
435
    public static void setScriptingEnabled(boolean scriptingEnabled) {
436
        if (scriptingEnabled != _scriptingEnabled) {
1✔
437
            _scriptingEngine = scriptingEnabled ? null : NULL_SCRIPTING_ENGINE_FACTORY;
1✔
438
        }
439
        _scriptingEnabled = scriptingEnabled;
1✔
440
    }
1✔
441

442
    public static boolean isScriptingEnabled() {
443
        return _scriptingEnabled;
1✔
444
    }
445

446
    /**
447
     * Determines whether script errors result in exceptions or warning messages.
448
     *
449
     * @return the current state
450
     */
451
    public static boolean setExceptionsThrownOnScriptError(boolean throwExceptions) {
452
        boolean current = _exceptionsThrownOnScriptError;
1✔
453
        _exceptionsThrownOnScriptError = throwExceptions;
1✔
454
        getScriptingEngine().setThrowExceptionsOnError(throwExceptions);
1✔
455
        return current;
1✔
456
    }
457

458
    /**
459
     * Returns true if script errors cause exceptions to be thrown.
460
     */
461
    public static boolean getExceptionsThrownOnScriptError() {
462
        return _exceptionsThrownOnScriptError;
1✔
463
    }
464

465
    /**
466
     * Returns the accumulated script error messages encountered. Error messages are accumulated only if
467
     * 'throwExceptionsOnError' is disabled.
468
     */
469
    public static String[] getScriptErrorMessages() {
470
        return getScriptingEngine().getErrorMessages();
1✔
471
    }
472

473
    /**
474
     * Clears the accumulated script error messages.
475
     */
476
    public static void clearScriptErrorMessages() {
477
        getScriptingEngine().clearErrorMessages();
1✔
478
    }
1✔
479

480
    private static void disableScripting(Exception e, String errorMessage) {
481
        System.err.println(errorMessage + _scriptEngineClassName);
×
482
        System.err.println("" + e);
×
483
        System.err.println("JavaScript execution disabled");
×
484
        _scriptingEngine = NULL_SCRIPTING_ENGINE_FACTORY;
×
485
    }
×
486

487
    // --------------------------------- private members --------------------------------------
488

489
    private static final String DEFAULT_CONTENT_TYPE = "text/html";
490

491
    private static final ScriptingEngineFactory NULL_SCRIPTING_ENGINE_FACTORY = new ScriptingEngineFactory() {
1✔
492
        @Override
493
        public boolean isEnabled() {
494
            return false;
×
495
        }
496

497
        @Override
498
        public void associate(WebResponse response) {
499
        }
1✔
500

501
        @Override
502
        public void load(WebResponse response) {
503
        }
1✔
504

505
        @Override
506
        public void setThrowExceptionsOnError(boolean throwExceptions) {
507
        }
×
508

509
        @Override
510
        public boolean isThrowExceptionsOnError() {
511
            return false;
×
512
        }
513

514
        @Override
515
        public String[] getErrorMessages() {
516
            return new String[0];
×
517
        }
518

519
        @Override
520
        public void clearErrorMessages() {
521
        }
×
522

523
        @Override
524
        public ScriptingHandler createHandler(HTMLElement element) {
525
            return ScriptableDelegate.NULL_SCRIPT_ENGINE;
1✔
526
        }
527

528
        @Override
529
        public ScriptingHandler createHandler(WebResponse response) {
530
            return ScriptableDelegate.NULL_SCRIPT_ENGINE;
×
531
        }
532

533
        @Override
534
        public void handleScriptException(Exception e, String badScript) {
535
            // happily ignore and exception
536
        }
×
537
    };
538

539
    /**
540
     * Add the name of a custom attribute that should be supported for form controls.
541
     *
542
     * @deprecated for new Scripting engine
543
     */
544
    @Deprecated
545
    public static void addCustomAttribute(String attributeName) {
546
        if (_customAttributes == null) {
1!
547
            _customAttributes = new HashSet<>();
1✔
548
        }
549
        _customAttributes.add(attributeName);
1✔
550
    }
1✔
551

552
    /**
553
     * Get the Set of custom attribute names to be supported by form controls.
554
     *
555
     * @deprecated for new scripting engine
556
     */
557
    @Deprecated
558
    static Set getCustomAttributes() {
559
        return _customAttributes;
1✔
560
    }
561

562
    private static Set _customAttributes = null;
1✔
563

564
    private static boolean _exceptionsOnErrorStatus = true;
1✔
565

566
    private static boolean _parameterValuesValidated = true;
1✔
567

568
    private static boolean _imagesTreatedAsAltText;
569

570
    private static boolean _loggingHttpHeaders;
571

572
    private static boolean _matchesIgnoreCase = true;
1✔
573

574
    private static boolean _postIncludesCharset = false;
1✔
575

576
    private static boolean _checkContentLength = false;
1✔
577

578
    private static int _redirectDelay;
579

580
    private static String _characterSet = StandardCharsets.ISO_8859_1.name();
1✔
581

582
    private static String _contentType = DEFAULT_CONTENT_TYPE;
1✔
583

584
    private static String _scriptEngineClassName;
585

586
    private static ScriptingEngineFactory _scriptingEngine;
587

588
    private static boolean _scriptingEnabled = true;
1✔
589

590
    private static boolean _exceptionsThrownOnScriptError = true;
1✔
591

592
    private static int _javaScriptOptimizationLevel = -1;
1✔
593

594
    private static boolean _checkHtmlContentType = false;
1✔
595

596
    static {
597
        reset();
1✔
598

599
    }
1✔
600

601
    /**
602
     * getter for Java Script optimization level
603
     *
604
     * @return the javaScriptOptimizationLevel to be use for running scripts
605
     */
606
    public static int getJavaScriptOptimizationLevel() {
607
        return _javaScriptOptimizationLevel;
1✔
608
    }
609

610
    /**
611
     * setter for Java Script optimization level
612
     *
613
     * @param scriptOptimizationLevel
614
     *            the _javaScriptOptimizationLevel to set see rhino documentation for valid values: -2: with
615
     *            continuation -1: interpret 0: compile to Java bytecode, don't optimize 1..9: compile to Java bytecode,
616
     *            optimize *
617
     */
618
    public static void setJavaScriptOptimizationLevel(int scriptOptimizationLevel) {
619
        _javaScriptOptimizationLevel = scriptOptimizationLevel;
×
620
    }
×
621
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc