Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5103 (closed)

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

RFE: Add use of java.io.Closeable to BF interfaces

Reported by: jamoore Owned by: mlinkert
Priority: minor Milestone: OMERO-4.4
Component: Bio-Formats Version: n.a.
Keywords: n.a. Cc: cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-11-10 (2)

Description

ome.utils.Utils.closeQuietly takes a java.io.Closeable instance for simple try/finally handling:

try {
   Closeable c = ...;
} finally {
   Utils.closeQuietly(c);
}

Adding Closeable to the inheritance hierarchy of FormatReader and FormatWriter would be very useful.

Change History (8)

comment:1 Changed 8 years ago by mlinkert

  • Milestone changed from Unscheduled to OMERO-Beta4.4

comment:2 Changed 8 years ago by mlinkert

  • Sprint set to 2011-11-10 (2)

comment:3 Changed 8 years ago by mlinkert

This should be covered by the '5103-closeable' branch in bioformats.git. Josh, when you have a chance could you please review?

If all OK, I'll then merge to develop and close the ticket.

comment:4 Changed 8 years ago by jmoore

  • Cc cxallan added

Looks straight-forward enough. If that doesn't make for any weirdness in your build, then I think that's all I was shooting for. Thanks, Melissa!

comment:5 Changed 8 years ago by Melissa Linkert <melissa@…>

(In [10f4aed7d542a5647fa35dc2db45d01b7e2d5b3a/bioformats.git]) IFormatHandler now extends java.io.Closeable.

Thus, IFormatReader and IFormatWriter also extend Closeable.

No methods are added or removed, we are just pushing the declaration of
'void close() throws IOException' up to Closeable.

See #5103.

comment:6 Changed 8 years ago by Melissa Linkert <melissa@…>

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from new to closed

(In [7bb6ae3719434087fb7421dcce8d229cd611c9d9/bioformats.git]) Merge branch '5103-closeable' into develop

Closes #5103.

comment:7 Changed 8 years ago by Melissa Linkert <melissa@…>

(In [10f4aed7d542a5647fa35dc2db45d01b7e2d5b3a/bioformats.git]) IFormatHandler now extends java.io.Closeable.

Thus, IFormatReader and IFormatWriter also extend Closeable.

No methods are added or removed, we are just pushing the declaration of
'void close() throws IOException' up to Closeable.

See #5103.

comment:8 Changed 8 years ago by Melissa Linkert <melissa@…>

(In [7bb6ae3719434087fb7421dcce8d229cd611c9d9/bioformats.git]) Merge branch '5103-closeable' into develop

Closes #5103.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.85058 sec.)

We're Hiring!