From e9cdedf747aa5f34530485a86fc01e3c0c9484a5 Mon Sep 17 00:00:00 2001 From: MrLolEthan Date: Sat, 16 May 2015 12:17:00 -0230 Subject: [PATCH] Fix compile-time error. When throwing a NotDeliciousException, the "new" keyword wasn't being used, thus causing it to be interpreted as a method call --- src/main/java/org/drtshock/Potato.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/drtshock/Potato.java b/src/main/java/org/drtshock/Potato.java index 173340a..9e81c74 100644 --- a/src/main/java/org/drtshock/Potato.java +++ b/src/main/java/org/drtshock/Potato.java @@ -24,7 +24,7 @@ public class Potato implements Tuber { public void prepare() throws NotDeliciousException { this.addCondiments("sour cream", "chives", "butter", "crumbled bacon", "grated cheese", "ketchup", "salt", "tabasco"); this.listCondiments(); - if(!this.isDelicious()) throw NotDeliciousException(); + if(!this.isDelicious()) throw new NotDeliciousException(); } public void addCondiments(String... names) {