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
This commit is contained in:
MrLolEthan 2015-05-16 12:17:00 -02:30
parent d714b8394c
commit e9cdedf747

View file

@ -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) {