Skip to content

Commit

Permalink
add serializable to the Supplier in generated Java code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumya Smruti Mishra committed Sep 20, 2023
1 parent 1092c3b commit faaaec7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Src/PCompiler/CompilerCore/Backend/Java/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal static class Constants

private static readonly string[] JreDefaultImports =
{
"java.io.Serializable"

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Ubuntu

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-MacOS

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Syntax error, ',' expected

Check failure on line 29 in Src/PCompiler/CompilerCore/Backend/Java/Constants.cs

View workflow job for this annotation

GitHub Actions / Build-And-Test-Windows

Syntax error, ',' expected
"java.util.*",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void WriteMonitorDecl()

private void WriteSupplierCDef(string cname)
{
WriteLine($"public static class Supplier implements java.util.function.Supplier<{cname}> {{");
WriteLine($"public static class Supplier implements java.util.function.Supplier<{cname}>, Serializable {{");
WriteLine($"public {cname} get() {{");
WriteLine($"{cname} ret = new {cname}();");
WriteLine("ret.ready();"); // TODO: at this point, we may as well ready() within the monitor's constructor?
Expand Down

0 comments on commit faaaec7

Please sign in to comment.