Skip to content

Code style: use generics everywhere, remove dead code, resource leaks, javadoc etc. #775

@bencomp

Description

@bencomp

Eclipse reports over 800 warnings in the current Dataverse code. That's a lot better than the 4500+ in recent 3.6.2 code, but too many.

These include

May I also recommend to add a bit of Javadoc to every method longer than, say, 10 lines? It makes understanding the code without looking at each and every line easier.

Bad habit found in v3.6: using a raw Map with 2 values of different classes instead of a new Class with two members, one of each type.

Map someMap = getMap();
TypeOne item1 = (TypeOne) someMap.get(0);
TypeTwo item2 = (TypeTwo) someMap.get(1);

With the proper use of generic types I'm sure you don't crazy stuff like that anymore, do you? ;)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions