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

hazendaz / httpunit / #155

20 Aug 2024 11:42PM UTC coverage: 80.622% (+0.004%) from 80.618%
#155

push

github

hazendaz
[ci] format the code

3231 of 4119 branches covered (78.44%)

Branch coverage included in aggregate %.

68 of 80 new or added lines in 21 files covered. (85.0%)

4 existing lines in 4 files now uncovered.

8285 of 10165 relevant lines covered (81.51%)

0.82 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-2024 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.util.HashSet;
30
import java.util.Set;
31
import java.util.Vector;
32

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

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

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

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

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

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

113
    /**
114
     * Resets the default character set to the HTTP default encoding.
115
     **/
116
    public static void resetDefaultCharacterSet() {
117
        _characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET;
×
118
    }
×
119

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

486
    // --------------------------------- private members --------------------------------------
487

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

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

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

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

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

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

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

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

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

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

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

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

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

561
    private static Set _customAttributes = null;
1✔
562

563
    private static boolean _exceptionsOnErrorStatus = true;
1✔
564

565
    private static boolean _parameterValuesValidated = true;
1✔
566

567
    private static boolean _imagesTreatedAsAltText;
568

569
    private static boolean _loggingHttpHeaders;
570

571
    private static boolean _matchesIgnoreCase = true;
1✔
572

573
    private static boolean _postIncludesCharset = false;
1✔
574

575
    private static boolean _checkContentLength = false;
1✔
576

577
    private static int _redirectDelay;
578

579
    private static String _characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET;
1✔
580

581
    private static String _contentType = DEFAULT_CONTENT_TYPE;
1✔
582

583
    private static String _scriptEngineClassName;
584

585
    private static ScriptingEngineFactory _scriptingEngine;
586

587
    private static boolean _scriptingEnabled = true;
1✔
588

589
    private static boolean _exceptionsThrownOnScriptError = true;
1✔
590

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

593
    private static boolean _checkHtmlContentType = false;
1✔
594

595
    static {
596
        reset();
1✔
597

598
    }
1✔
599

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

609
    /**
610
     * setter for Java Script optimization level
611
     *
612
     * @param scriptOptimizationLevel
613
     *            the _javaScriptOptimizationLevel to set see rhino documentation for valid values: -2: with
614
     *            continuation -1: interpret 0: compile to Java bytecode, don't optimize 1..9: compile to Java bytecode,
615
     *            optimize *
616
     */
617
    public static void setJavaScriptOptimizationLevel(int scriptOptimizationLevel) {
618
        _javaScriptOptimizationLevel = scriptOptimizationLevel;
×
619
    }
×
620
}
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