File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
src/main/java/seedu/address Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -33,21 +33,18 @@ public DelGrpCommand(GrpContainsKeywordPredicate grpPredicate) {
33
33
public CommandResult execute (Model model ) throws CommandException {
34
34
requireNonNull (model );
35
35
36
- Group toDel = new Group ();
37
-
38
- boolean hasGroup = false ;
36
+ Group toDel = null ;
39
37
40
38
if (!model .getSerenity ().getGroupList ().isEmpty ()) {
41
39
for (Group group : model .getSerenity ().getGroupList ()) {
42
40
if (group .getName ().equals (grpPredicate .getKeyword ())) {
43
41
toDel = group ;
44
- hasGroup = true ;
45
42
break ;
46
43
}
47
44
}
48
45
}
49
46
50
- if (! hasGroup ) {
47
+ if (toDel == null ) {
51
48
throw new CommandException (Messages .MESSAGE_GROUP_EMPTY );
52
49
}
53
50
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ public class Group {
25
25
private UniqueStudentList students ;
26
26
private UniqueLessonList lessons ;
27
27
28
- // Empty constructor
29
- public Group () {}
30
-
31
28
/**
32
29
* Constructs a {@code Group}
33
30
*
You can’t perform that action at this time.
0 commit comments