Zadanie #7460

Usunięcie warningów

Added by Michał Marcińczuk almost 6 years ago. Updated over 5 years ago.

Status:NowyStart date:18 Oct 2016
Priority:NormalnyDue date:
Assignee:Jan Kocoń% Done:

90%

Category:-
Target version:-

Description

Podczas kompilacji modułów zgłaszane są warningi (użycie wycofanej metody, brak jawnej deklaracji typu). Tam gdzie to możliwe należy usunąć warningi.

History

#1 Updated by Jan Kocoń almost 6 years ago

  • % Done changed from 0 to 90

#2 Updated by Michał Marcińczuk over 5 years ago

  • Assignee set to Jan Kocoń

Jeszcze zostało garstka warningów z klas związanych z normalizacją. Poniżej znajduje się log z kompilacji:

/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/tools/NormalizerEvaluator.java:219: warning: non-varargs call of varargs method with inexact argument type for last parameter;
        println(String.format(HEADER_TEMPLATE, HEADER));
                                               ^
  cast to Object for a varargs call
  cast to Object[] for a non-varargs call and to suppress this warning
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/TimexEntity.java:43: warning: [rawtypes] found raw type: EntityConstraint
    void assertConstraintsSatisfied(Collection<? extends EntityConstraint> constraints);
                                                         ^
  missing type arguments for generic class EntityConstraint<T>
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:89: warning: [rawtypes] found raw type: Map
        Map patterns = (JSONObject) parsed.get("patterns");
        ^
  missing type arguments for generic class Map<K,V>
  where K,V are type-variables:
    K extends Object declared in interface Map
    V extends Object declared in interface Map
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:115: warning: [unchecked] unchecked conversion
        ArrayList<JSONObject> rulesDef = (JSONArray) parsed.get("rules");
                                         ^
  required: ArrayList<JSONObject>
  found:    JSONArray
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:120: warning: [rawtypes] found raw type: Map
                    Map value = (JSONObject)((Map.Entry) entry).getValue();
                    ^
  missing type arguments for generic class Map<K,V>
  where K,V are type-variables:
    K extends Object declared in interface Map
    V extends Object declared in interface Map
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:131: warning: [unchecked] unchecked conversion
        ArrayList<JSONObject> normalizationDef = (JSONArray) parsed.get("normalization");
                                                 ^
  required: ArrayList<JSONObject>
  found:    JSONArray
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:143: warning: [cast] redundant cast to String
                            normalization.put(key2, (String) value2);
                                                    ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:159: warning: [rawtypes] found raw type: List
    static private String join(List l, String s){
                               ^
  missing type arguments for generic class List<E>
  where E is a type-variable:
    E extends Object declared in interface List
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/rbn/RuleSetLoader.java:160: warning: [rawtypes] found raw type: Iterator
        Iterator it = l.iterator();
        ^
  missing type arguments for generic class Iterator<E>
  where E is a type-variable:
    E extends Object declared in interface Iterator
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/global_rules/AbstractRule.java:116: warning: [unchecked] Possible heap pollution from parameterized vararg type T
    static public <T> T firstNotNull(T... objs){
                                          ^
  where T is a type-variable:
    T extends Object declared in method <T>firstNotNull(T...)
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:73: warning: [rawtypes] found raw type: EntityConstraint
    public void assertConstraintsSatisfied(Collection<? extends EntityConstraint> constraints){
                                                                ^
  missing type arguments for generic class EntityConstraint<T>
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:74: warning: [rawtypes] found raw type: EntityConstraint
        List<EntityConstraint> unsatisfied = new ArrayList<>();
             ^
  missing type arguments for generic class EntityConstraint<T>
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:75: warning: [rawtypes] found raw type: EntityConstraint
        for (EntityConstraint constraint: constraints){
             ^
  missing type arguments for generic class EntityConstraint<T>
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:76: warning: [unchecked] unchecked call to isSatisfied(T) as a member of the raw type EntityConstraint
            if (!constraint.isSatisfied(this))
                                       ^
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:82: warning: [rawtypes] found raw type: EntityConstraint
        for (EntityConstraint constraint: unsatisfied)
             ^
  missing type arguments for generic class EntityConstraint<T>
  where T is a type-variable:
    T extends TimexEntity declared in interface EntityConstraint
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/AbstractEntity.java:11: warning: [serial] serializable class AbstractEntity has no definition of serialVersionUID
public abstract class AbstractEntity implements TimexEntity{
                ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/DateEntity.java:3: warning: [serial] serializable class DateEntity has no definition of serialVersionUID
public abstract class DateEntity extends AbstractEntity{
                ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/LValEntity.java:3: warning: [serial] serializable class LValEntity has no definition of serialVersionUID
public class LValEntity extends AbstractEntity{
       ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/DateTimeEntity.java:3: warning: [serial] serializable class DateTimeEntity has no definition of serialVersionUID
public class DateTimeEntity extends AbstractEntity{
       ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/TimeEntity.java:3: warning: [serial] serializable class TimeEntity has no definition of serialVersionUID
public abstract class TimeEntity extends AbstractEntity{
                ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/GeneralDateEntity.java:5: warning: [serial] serializable class GeneralDateEntity has no definition of serialVersionUID
public class GeneralDateEntity extends DateEntity {
       ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/GeneralTimeEntity.java:5: warning: [serial] serializable class GeneralTimeEntity has no definition of serialVersionUID
public class GeneralTimeEntity extends TimeEntity{
       ^
/home/czuk/nlp/eclipse/workspace_liner2/liner2_master/g419-liner2-core/src/main/java/g419/liner2/api/normalizer/timex/entities/WeekEntity.java:5: warning: [serial] serializable class WeekEntity has no definition of serialVersionUID
public class WeekEntity extends DateEntity{

Also available in: Atom PDF