Skip to content
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

Added new catch block for character encoding error cases. #5124

Merged

Conversation

jonn-smith
Copy link
Collaborator

Added a new catch block in PathLineIterator for character encoding
errors, along with a new error message to be given to the user for such
cases.

Added unit test for malformed xsv locatable files.

Fixes #4006

Added a new catch block in `PathLineIterator` for character encoding
errors, along with a new error message to be given to the user for such
cases.

Added unit test for malformed xsv locatable files.

Fixes #4006
@codecov-io
Copy link

codecov-io commented Aug 20, 2018

Codecov Report

Merging #5124 into master will increase coverage by <.001%.
The diff coverage is 59.375%.

@@              Coverage Diff              @@
##             master    #5124       +/-   ##
=============================================
+ Coverage     86.66%   86.66%   +<.001%     
- Complexity    29043    29048        +5     
=============================================
  Files          1808     1808               
  Lines        134662   134686       +24     
  Branches      14935    14938        +3     
=============================================
+ Hits         116698   116719       +21     
  Misses        12552    12552               
- Partials       5412     5415        +3
Impacted Files Coverage Δ Complexity Δ
...nder/tools/funcotator/FuncotatorTestConstants.java 96.97% <ø> (ø) 1 <0> (ø) ⬇️
...ataSources/xsv/SimpleKeyXsvFuncotationFactory.java 87.097% <100%> (ø) 27 <0> (ø) ⬇️
...tils/codecs/xsvLocatableTable/XsvTableFeature.java 58.571% <100%> (+1.855%) 17 <0> (ø) ⬇️
...stitute/hellbender/utils/nio/PathLineIterator.java 64.286% <25%> (-10.714%) 4 <1> (ø)
...LocatableTable/XsvLocatableTableCodecUnitTest.java 77.095% <52.381%> (-3.53%) 27 <3> (+3)
...oadinstitute/hellbender/utils/gcs/BucketUtils.java 80% <0%> (+1.29%) 40% <0%> (ø) ⬇️
...ithwaterman/SmithWatermanIntelAlignerUnitTest.java 90% <0%> (+30%) 2% <0%> (ø) ⬇️
...utils/smithwaterman/SmithWatermanIntelAligner.java 90% <0%> (+40%) 3% <0%> (+2%) ⬆️

Copy link
Contributor

@LeeTL1220 LeeTL1220 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if I understand correctly, @jonn-smith , this is simply if there is a character encoding issue in the config file for an xsv locatable datasource/funcotationfactory?

If so, that is fine. Minor comment(s)... feel free to merge after addressed.

@@ -30,10 +32,14 @@
* @param path path to a text file.
* @throws UserException if we cannot open the file for reading.
*/
public PathLineIterator(Path path) throws UserException {
public PathLineIterator(final Path path) throws UserException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need throws UserException, since that is a runtime exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not. I'll pull it out.

@jonn-smith
Copy link
Collaborator Author

That's correct. I ran into a character encoding issue with a test file at one point. This will make the errors a little more explanatory.

@jonn-smith jonn-smith merged commit 401d217 into master Aug 22, 2018
@jonn-smith jonn-smith deleted the jts_funcotator_xsv_encoding_error_fix_4006_ATTEMPT_2 branch August 22, 2018 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants