Browse Source

Fix NPE in Preparation.

Sam Jaffe 5 years ago
parent
commit
f1a8c716a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/lombok/org/leumasjaffe/recipe/model/Preparation.java

+ 1 - 1
src/main/lombok/org/leumasjaffe/recipe/model/Preparation.java

@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor;
 
 
 @Data @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode(callSuper=false)
 @Data @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode(callSuper=false)
 public class Preparation extends Observable.Instance implements RecipeComponent {
 public class Preparation extends Observable.Instance implements RecipeComponent {
-	Duration duration;
+	Duration duration = Duration.ZERO;
 	@JsonIgnore Supplier<Collection<Ingredient>> producer = Collections::emptyList;
 	@JsonIgnore Supplier<Collection<Ingredient>> producer = Collections::emptyList;
 	
 	
 	@JsonIgnore
 	@JsonIgnore