repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Throw an error for illegal arguments.
[Persons_Comparator.git]
/
src
/
Size.java
diff --git
a/src/Size.java
b/src/Size.java
index 0cecada6c98192f7cfa94f874f937e1fe9831276..dfea96cdd8226c8dba12b50fa86423ceb2635658 100644
(file)
--- a/
src/Size.java
+++ b/
src/Size.java
@@
-15,7
+15,9
@@
public class Size {
public void setSize(int size) {
if (validateSize(size)) {
this.size = size;
public void setSize(int size) {
if (validateSize(size)) {
this.size = size;
- } /* FIXME: raise an error */
+ } else {
+ throw new IllegalArgumentException("Size must be between" + this.min + " and " + this.max);
+ }
}
private boolean validateSize(int size) {
}
private boolean validateSize(int size) {