• (nodebb)

    Slow day, Remy?

  • Rob (unregistered)

    In Java you cannot create an array of a generic type. new ArrayList<String>[0] will give a compiler errors. They could have added a generic type on the variable type, but the following gives an unchecked conversion warning: ArrayList<String> data = new ArrayList[dataList.size()].

    And of course extra penalty-points for declaring it as ArrayList instead of List.

  • (nodebb)

    My bet is homebrew serialization is the next step

  • (nodebb)

    Well, they have to declare ArrayList as non-generic here to create an array, as Java doesn't allow creating arrays of generics.

    But if they really wanted a list of lists, they could have created a List<List<Something>> without bothering with arrays. Arrays are a low-level language feature that are mostly useful for working with binary data and implementing collections.

  • Conradus (unregistered)

    It's the return of the arrject! https://thedailywtf.com/articles/arrject

  • SG (unregistered)

    Funny... I see lists of arrays fairly often, but arrays of lists is more of a novelty.

    And no, it doesn't bode well for the quality of the rest of the code.

Leave a comment on “Listing Off the Problems”

Log In or post as a guest

Replying to comment #:

« Return to Article