-
Notifications
You must be signed in to change notification settings - Fork 241
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
#4149 - FindBugs fixes #3
Conversation
Noticed by FindBugs. See ome#4149.
Noticed by FindBugs. See ome#4149.
Noticed by FindBugs. See ome#4149.
This allows it to find absolutely all of the classes that it needs. Usually, it is just the slf4j/log4j JARs that are needed (and not included in the compile-time classpath).
No component generates loci-io-image.jar, so it shouldn't be on the classpath. This prevents FindBugs from failing because it can't locate loci-io-image.jar.
Politely requested by FindBugs.
Noticed by FindBugs.
Noticed by FindBugs.
Noticed by FindBugs.
Noticed by FindBugs.
Noticed by FindBugs.
...since we also overrode Object.equals(Object). Noticed by FindBugs.
The only thing I can see is some remaining, non-constant UTF-8s. @chris-allan, did you get notified of this PR? |
...so now we are not writing "UTF-8" as a non-constant in many different places.
Non-constant usages of "UTF-8" should be resolved now. The default encoding is now defined once in a new class (loci.common.Constants) and used across all of the components. |
@joshmoore: Sure did. For what it's worth explicitly setting a "UTF-8" encoding on any of these transforms is bound to potentially introduce or fix several things. It is not the default encoding on Mac OS X for instance. |
Fair enough. UTF-8 is the default encoding on Linux (at least for me), though, so I'd be a little surprised if it causes major problems. If you would rather not set encoding to UTF-8 across the board, then we'll need to convince FindBugs not to complain when the default encoding is used. |
Doh. Waited so long that this no automatically merges. Might have to take care of manually. Was there any decision on the UTF-8 front? |
@joshmoore @chris-allan and I talked about it last week, and the decision was that I need to write some tests to compare UTF-8, MacRoman, and Windows-1252 encodings (the default encodings on various platforms) before we go further. If it's easier, I can close this PR, fix up the branch so that it can be automatically merged, and then re-open once tests are done and pushed. |
Hold off on the closing/re-opening, Melissa. Chris suggested a better way to take care of those that we can try out when you are ready. |
These tests will fail on all of the test strings that contain non-ASCII characters.
Encoding tests added in above commit. Enforcing UTF-8 across the board will mean that any files encoded with MacRoman or Windows-1252 will be decoded incorrectly if any non-ASCII characters are present. But then, we would have had this problem anyway when reading a MacRoman file on anything other than Mac OS 9 or when reading a Windows-1252 file on anything other than Windows. |
@melissalinkert: This one also needs the same |
Conflicts: components/bio-formats/src/loci/formats/in/NativeND2Reader.java
Fix test suite's logback.xml to write to a logfile
Remaining fixes: For small wavelengths and light source linking
Add intermediate ReaderTest class to initialize reader and default sizes
Different transform sequence
Remove unnecessary image count check
Fix formatting for list, note & menu options
Add test to check that explicitly disabling tiling works
KLB reader
Resolves all bugs/warnings found by FindBugs, and updates the 'findbugs' Ant target to fail if a bug or warning is found.
Should close #4149.