aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/java.js')
-rw-r--r--lib/compilers/java.js30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/compilers/java.js b/lib/compilers/java.js
index 677eeb323..c61cc8f65 100644
--- a/lib/compilers/java.js
+++ b/lib/compilers/java.js
@@ -111,22 +111,10 @@ export class JavaCompiler extends BaseCompiler {
return path.join(dirPath, `${path.basename(this.compileFilename, this.lang.extensions[0])}.class`);
}
- filterUserOptions(userOptions) {
+ filterUserOptionsWithArg(userOptions, oneArgForbiddenList) {
const filteredOptions = [];
let toSkip = 0;
- const oneArgForbiddenList = new Set([
- // -d directory
- // Sets the destination directory for class files.
- '-d',
- // -s directory
- // Specifies the directory used to place the generated source files.
- '-s',
- // --source-path path or -sourcepath path
- // Specifies where to find input source files.
- '--source-path', '-sourcepath',
- ]);
-
for (const userOption of userOptions) {
if (toSkip > 0) {
toSkip--;
@@ -143,6 +131,22 @@ export class JavaCompiler extends BaseCompiler {
return filteredOptions;
}
+ filterUserOptions(userOptions) {
+ const oneArgForbiddenList = new Set([
+ // -d directory
+ // Sets the destination directory for class files.
+ '-d',
+ // -s directory
+ // Specifies the directory used to place the generated source files.
+ '-s',
+ // --source-path path or -sourcepath path
+ // Specifies where to find input source files.
+ '--source-path', '-sourcepath',
+ ]);
+
+ return this.filterUserOptionsWithArg(userOptions, oneArgForbiddenList);
+ }
+
processAsm(result) {
// Handle "error" documents.
if (!result.asm.includes('\n') && result.asm[0] === '<') {