aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.ts
diff options
context:
space:
mode:
authorJeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>2023-02-22 17:45:55 -0500
committerGitHub <noreply@github.com>2023-02-22 17:45:55 -0500
commit563b220cb9243ea19a49cfe82cf9fcadda79b600 (patch)
tree158e3737e83ca4e3c00f647a13c74b070549e315 /lib/compilers/java.ts
parent17ac75facd403c7f476546707645989191fe4864 (diff)
downloadcompiler-explorer-563b220cb9243ea19a49cfe82cf9fcadda79b600.tar.gz
compiler-explorer-563b220cb9243ea19a49cfe82cf9fcadda79b600.zip
Type work for some handlers and stuff related to the compiler-finder (#4752)gh-6407
Diffstat (limited to 'lib/compilers/java.ts')
-rw-r--r--lib/compilers/java.ts17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/compilers/java.ts b/lib/compilers/java.ts
index 8f2a3e91a..cf665646e 100644
--- a/lib/compilers/java.ts
+++ b/lib/compilers/java.ts
@@ -27,7 +27,7 @@ import path from 'path';
import fs from 'fs-extra';
import {ParsedAsmResult, ParsedAsmResultLine} from '../../types/asmresult/asmresult.interfaces';
-import {CompilerInfo} from '../../types/compiler.interfaces';
+import {PreliminaryCompilerInfo} from '../../types/compiler.interfaces';
import {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces';
import {unwrap} from '../assert';
import {BaseCompiler} from '../base-compiler';
@@ -44,12 +44,15 @@ export class JavaCompiler extends BaseCompiler {
javaRuntime: string;
mainRegex: RegExp;
- constructor(compilerInfo: CompilerInfo, env) {
- // Default is to disable all "cosmetic" filters
- if (!compilerInfo.disabledFilters) {
- compilerInfo.disabledFilters = ['labels', 'directives', 'commentOnly', 'trim'];
- }
- super(compilerInfo, env);
+ constructor(compilerInfo: PreliminaryCompilerInfo, env) {
+ super(
+ {
+ // Default is to disable all "cosmetic" filters
+ disabledFilters: ['labels', 'directives', 'commentOnly', 'trim'],
+ ...compilerInfo,
+ },
+ env,
+ );
this.javaRuntime = this.compilerProps<string>(`compiler.${this.compiler.id}.runtime`);
this.mainRegex = /public static ?(.*?) void main\(java\.lang\.String\[]\)/;
}