aseemgoyal / apps-for-android

Automatically exported from code.google.com/p/apps-for-android
Apache License 2.0
0 stars 0 forks source link

Unchecked warning in Photostream #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[Reported against r17 of Photostream]

There's an unchecked warning in UserTask.java

photostream\UserTask.java:215: warning: [unchecked]
 unchecked generic array creation of type Result[] for varargs parameter
  new UserTaskResult<Result>(UserTask.this, result));

Caused by mixing of generics with arrays in the UserTaskResult constructor:

  UserTaskResult(UserTask task, Data... data)

Fix: Replace arrays with lists? (per Effective Java 2nd Ed. Ch. 5)

Original issue reported on code.google.com by joe.bowb...@gmail.com on 30 Aug 2008 at 8:12

GoogleCodeExporter commented 9 years ago
This is a warning but the code is safe. The code will keep using arrays to 
enable the use of the varargs. It would 
be unnecessarily costly to go back and forth between arrays and lists.

Original comment by romaingu...@gtempaccount.com on 2 Sep 2008 at 9:48