Skip to content

Commit c879304

Browse files
authored
Merge pull request diffblue#553 from diffblue/jd/feature/ts_synthetic_method_application
Adds centralised synthetic name generation to the Typescript
2 parents d9e72ec + a08d4d3 commit c879304

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

env-model-generator/src/createEntryPoint.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ConfigParseError } from "./configParseError";
33
import { EntryPoint, EntryPointConfig } from "./entryPointConfig";
44
import { Cast, Class, Declaration, Expression, FnCall, FnStatement, Method, Null, Statement, StringConstant } from "./javaCode";
55
import { Repository } from "./model";
6-
import { makeIdentifier } from "./utils";
76

87
export async function processEntryPointConfigAsync(filePath: string): Promise<Class> {
98
let json: string;
@@ -39,7 +38,7 @@ function createEntryPoint(entryPoint: EntryPoint): Method {
3938
// TODO: For particular types where we need an artificlal sink, test entryPoint.method.returnType, then insert a Declaration and a call to the sink
4039
statements.push(new FnStatement(entryPointCall));
4140

42-
return new Method(`public static void ${makeIdentifier(entryPoint.className)}_${makeIdentifier(entryPoint.method.name)}_entryPoint()`,
41+
return new Method(`public static void ${entryPoint.method.syntheticMethodName}()`,
4342
statements, ["Exception"]);
4443
}
4544

env-model-generator/src/entryPointConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface Method {
1212
arguments: Argument[];
1313
returnType: string;
1414
signature: string;
15+
syntheticMethodName: string;
1516
}
1617

1718
export interface Argument {

0 commit comments

Comments
 (0)