Community
Participate
Working Groups
BETA_JAVA7 The error message considers AutoCloseable as a class here: public class TryWithResources3 { public static void main(String[] args) { try (Object res= 0) { } catch (Exception e) { } } } Error message: The resource type Object has to be a subclass of java.lang.AutoCloseable Expected: The resource type Object must implement java.lang.AutoCloseable
I'll fix it.
Created attachment 198301 [details] Proposed patch We now issue an error message that says: "The resource type Object does not implement java.lang.AutoCloseable"
Released in BETA_JAVA7 branch.
I think we should also renamed the corresponding IProblem.
Created attachment 198345 [details] Proposed fix Complement of the previous patch
Verified with v20110714-1300.