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:
parent
d714b8394c
commit
e9cdedf747
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ public class Potato implements Tuber {
|
||||||
public void prepare() throws NotDeliciousException {
|
public void prepare() throws NotDeliciousException {
|
||||||
this.addCondiments("sour cream", "chives", "butter", "crumbled bacon", "grated cheese", "ketchup", "salt", "tabasco");
|
this.addCondiments("sour cream", "chives", "butter", "crumbled bacon", "grated cheese", "ketchup", "salt", "tabasco");
|
||||||
this.listCondiments();
|
this.listCondiments();
|
||||||
if(!this.isDelicious()) throw NotDeliciousException();
|
if(!this.isDelicious()) throw new NotDeliciousException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCondiments(String... names) {
|
public void addCondiments(String... names) {
|
||||||
|
|
Loading…
Reference in a new issue