-
Notifications
You must be signed in to change notification settings - Fork 13
Bye bye commons-io #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
| import java.nio.ByteOrder; | ||
| import java.nio.channels.FileLock; | ||
| import java.nio.channels.OverlappingFileLockException; | ||
| import java.nio.file.Files; | ||
| import java.util.List; | ||
|
|
||
| import loci.formats.FormatException; | ||
|
|
@@ -37,7 +38,6 @@ | |
| import ome.xml.model.enums.EnumerationException; | ||
| import ome.xml.model.primitives.PositiveInteger; | ||
|
|
||
| import org.apache.commons.io.FileUtils; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
|
|
@@ -440,7 +440,7 @@ protected void closeWriter() throws IOException | |
| try { | ||
| if (writerFile != null) { | ||
| try { | ||
| FileUtils.moveFile(writerFile, readerFile); | ||
| Files.move(writerFile.toPath(), readerFile.toPath()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a caveat, the docs for nio.files state
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, I checked that before I made the change. That specific behaviour is identical to that of
There are likely other behavioral differences but I don't think they're particularly relevant. |
||
| } finally { | ||
| writerFile = null; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running
gradle dependenciesshows quite a lot of inclusions ofcommons-io. Would excluding it entirely not trigger an error when a dependency attempts to use anycommons-ioAPIs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what is currently happening
omero-rendererfor example usescommons-iocf. build link in the previous commentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would, however that's highly situational. Let's take one commons-io example from the dependency tree of this library:
This is brought in because
omero-romiodepends onomero-commonwhich by extension depends onomero-model. Hibernate annotations are used there so nearly all the Hibernate JARs are brought in. However,omero-romiodoesn't actually use any of these classes itself.It's hard to build things in such a way where dependencies do not unexpectedly leak. Serious software engineering care and attention has to be paid to interface, concrete class, and dependency construction to avoid it and we have not historically spent a lot of time doing so.
Are you talking about
omero-server, @jburel? There are noomero-rendererbuild failure references that I can see in the aforementioned build 72 failure. Rather the issues seem to be inomero-server, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sorry I mean
omero-server.