Skip to content

Commit

Permalink
Default folder for solution serializer and throw if format is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartinsanta committed Apr 23, 2024
1 parent a9d8942 commit 8ea73c0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ public class AbstractSerializerConfig {
/**
* The serializer is enabled
*/
private boolean enabled;
private boolean enabled = false;

/**
* Path where solutions will be exported
*/
private String folder;
private String folder = "";

/**
* String formatter for current date using in solution filename
Expand All @@ -28,6 +28,9 @@ public class AbstractSerializerConfig {
* @return filename format as a string
*/
public String getFormat() {
if(format == null || format.isEmpty()){
throw new IllegalArgumentException("Format cannot be empty, please configure a valid format for serializer " + this.getClass().getSimpleName());
}
return format;
}

Expand Down

0 comments on commit 8ea73c0

Please sign in to comment.