https://bugzilla.novell.com/show_bug.cgi?id=635552

https://bugzilla.novell.com/show_bug.cgi?id=635552#c0


           Summary: Types implementing Java.IO.Closeable should also
                    implement System.IDisposable
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


The java.io.Closeable interface was added in Java 6, and is the moral
equivalent of System.IDisposable.  Java 7 will supposedly add "native" support
for this interface, allowing Java code such as:

    do (Closeable c = ...) {
    }
    // at end of block, c.close() is implicitly invoked.

This is basically C#'s 'using' block.

Thus, to permit better use of C# functionality, every type that implements
Java.IO.ICloseable should ALSO implement System.IDisposable (possibly
explicitly), where IDisposable.Dispose() would simply call Close():

    namespace Java.IO {
        public abstract partial class Reader : Java.Lang.Object,
                Java.IO.ICloseable, Java.Lang.IReadable, System.IDisposable
        {
            void IDisposable.Dispose() {Close();}

            // other generated methods...
        }
    }

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to