Skip to content

Commit

Permalink
static is redundant for inner records
Browse files Browse the repository at this point in the history
  • Loading branch information
carueda committed Dec 19, 2024
1 parent 1aedca2 commit 0f794ad
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/tscfg/generators/java/JavaGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class JavaGen(
"\n static final $TsCfgValidator $tsCfgValidator = new $TsCfgValidator();\n"
else ""

s"""public ${if (isRoot) "" else "static "}record $classNameAdjusted(
s"""public record $classNameAdjusted(
| $classDeclMembersStr$classMemberGettersStr
|) $extendsString{$beginningBody
| $membersStr
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/tscfg/example/JavaIssue312aCfg.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public record JavaIssue312aCfg(
* @param port
* Port for the endpoint service.
*/
public static record Endpoint(
public record Endpoint(
Endpoint.Notification notification,
java.lang.String path,
int port
Expand All @@ -30,10 +30,10 @@ public static record Endpoint(
* @param emails
* Emails to send notifications to.
*/
public static record Notification(
public record Notification(
java.util.List<Notification.Emails$Elm> emails
) {
public static record Emails$Elm(
public record Emails$Elm(
java.lang.String email,
java.lang.String name
) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/tscfg/example/JavaIssue75Cfg.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public record JavaIssue75Cfg(
) {
static final $TsCfgValidator $tsCfgValidator = new $TsCfgValidator();

public static record Simple(
public record Simple(
java.lang.String foo,
int int_
) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/tscfg/example/JavaIssue75bCfg.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public record JavaIssue75bCfg(
) {
static final $TsCfgValidator $tsCfgValidator = new $TsCfgValidator();

public static record Simple(
public record Simple(
java.lang.String foo,
int int_
) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/tscfg/example/JavaIssue75eCfg.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public record JavaIssue75eCfg(
) {
static final $TsCfgValidator $tsCfgValidator = new $TsCfgValidator();

public static record Simple(
public record Simple(
java.lang.String foo,
int int_
) implements java.io.Serializable {
Expand Down

0 comments on commit 0f794ad

Please sign in to comment.