WhitmanSWDesignSpring2018 / project-5-8-teamuno

project-5-8-teamuno created by GitHub Classroom
0 stars 1 forks source link

Resolve compile warnings re: generics #26

Open ProfJanetDavis opened 5 years ago

ProfJanetDavis commented 5 years ago
[3:48pm] janet@wks-14-232 (~/370/Grading/project-5-8-teamuno/src): javac -Xlint:unchecked tunecomposer/*.java
tunecomposer/Gesture.java:84: warning: [unchecked] unchecked call to addAll(Collection) as a member of the raw type AbstractCollection
            notes.addAll(p.getChildLeaves());
                        ^
  where E is a type-variable:
    E extends Object declared in class AbstractCollection
tunecomposer/Gesture.java:86: warning: [unchecked] unchecked conversion
        return notes;
               ^
  required: HashSet
  found:    HashSet
tunecomposer/TuneComposer.java:198: warning: [unchecked] unchecked method invocation: constructor  in class Gesture is applied to given types
        compositionpane.getChildren().add(new Gesture(group));
                                          ^
  required: HashSet
  found: HashSet
tunecomposer/TuneComposer.java:198: warning: [unchecked] unchecked conversion
        compositionpane.getChildren().add(new Gesture(group));
                                                      ^
  required: HashSet
  found:    HashSet
tunecomposer/TuneComposer.java:346: warning: [unchecked] unchecked call to addAll(Collection) as a member of the raw type AbstractCollection
           notes.addAll(p.getChildLeaves());
                       ^
  where E is a type-variable:
    E extends Object declared in class AbstractCollection
tunecomposer/TuneComposer.java:348: warning: [unchecked] unchecked conversion
        return notes;
               ^
  required: HashSet
  found:    HashSet
tunecomposer/NoteBar.java:72: warning: [unchecked] unchecked call to add(E) as a member of the raw type HashSet
        set.add(this);
               ^
  where E is a type-variable:
    E extends Object declared in class HashSet
tunecomposer/NoteBar.java:73: warning: [unchecked] unchecked conversion
        return set;
               ^
  required: HashSet
  found:    HashSet
8 warnings
ProfJanetDavis commented 5 years ago
[9:32am] janet@wks-14-232 (~/370/Grading/project-5-8-teamuno/src): javac -Xlint:unchecked  tunecomposer/*.java
tunecomposer/Gesture.java:72: warning: [unchecked] unchecked call to addAll(Collection) as a member of the raw type AbstractCollection
            notes.addAll(p.getChildLeaves());
                        ^
  where E is a type-variable:
    E extends Object declared in class AbstractCollection
tunecomposer/Gesture.java:74: warning: [unchecked] unchecked conversion
        return notes;
               ^
  required: HashSet
  found:    HashSet
tunecomposer/GroupCommand.java:20: warning: [unchecked] unchecked method invocation: method groupedConstructor in class GroupCommand is applied to given types
        if(wasGrouped){groupedConstructor(stuff);}
                                         ^
  required: HashSet
  found: HashSet
tunecomposer/GroupCommand.java:20: warning: [unchecked] unchecked conversion
        if(wasGrouped){groupedConstructor(stuff);}
                                          ^
  required: HashSet
  found:    HashSet
tunecomposer/GroupCommand.java:21: warning: [unchecked] unchecked method invocation: method ungroupedConstructor in class GroupCommand is applied to given types
        else{ungroupedConstructor(stuff);}
                                 ^
  required: HashSet>
  found: HashSet
tunecomposer/GroupCommand.java:21: warning: [unchecked] unchecked conversion
        else{ungroupedConstructor(stuff);}
                                  ^
  required: HashSet>
  found:    HashSet
tunecomposer/GroupCommand.java:29: warning: [unchecked] unchecked call to HashSet(Collection) as a member of the raw type HashSet
        toUngroup = new HashSet(grouped);
                    ^
  where E is a type-variable:
    E extends Object declared in class HashSet
tunecomposer/GroupCommand.java:29: warning: [unchecked] unchecked conversion
        toUngroup = new HashSet(grouped);
                    ^
  required: HashSet
  found:    HashSet
tunecomposer/GroupCommand.java:38: warning: [unchecked] unchecked call to HashSet(Collection) as a member of the raw type HashSet
        toGroup = new HashSet(ungrouped);
                  ^
  where E is a type-variable:
    E extends Object declared in class HashSet
tunecomposer/GroupCommand.java:38: warning: [unchecked] unchecked conversion
        toGroup = new HashSet(ungrouped);
                  ^
  required: HashSet>
  found:    HashSet
tunecomposer/MoveCommand.java:26: warning: [unchecked] unchecked conversion
        editedRects = edits;
                      ^
  required: Set
  found:    Set
11 warnings