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

fix: close readers after reading #563

Merged
merged 2 commits into from
Jan 31, 2022
Merged

Conversation

midgleyc
Copy link
Member

Follow-on from #557.

Close more readers after reading. I searched through the codebase for "[rR]eader =" to find these, doubt I have them all.

Non-readers weren't touched, e.g. MallPriceDatabase has a series of unclosed connections and writers.

Change tests to use real BufferedReaders instead of a mocked class.

@midgleyc midgleyc requested a review from a team as a code owner January 30, 2022 21:09
@codecov
Copy link

codecov bot commented Jan 30, 2022

Codecov Report

Merging #563 (9012fb3) into main (7916142) will decrease coverage by 0.03%.
The diff coverage is 7.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #563      +/-   ##
============================================
- Coverage     20.36%   20.33%   -0.04%     
+ Complexity     8584     8570      -14     
============================================
  Files           998      998              
  Lines        155975   155995      +20     
  Branches      34702    34704       +2     
============================================
- Hits          31767    31718      -49     
- Misses       118286   118359      +73     
+ Partials       5922     5918       -4     
Impacted Files Coverage Δ
src/net/sourceforge/kolmafia/StaticEntity.java 15.92% <0.00%> (-0.05%) ⬇️
...rceforge/kolmafia/persistence/BuffBotDatabase.java 0.00% <0.00%> (ø)
...eforge/kolmafia/persistence/MallPriceDatabase.java 22.72% <0.00%> (-0.93%) ⬇️
...sourceforge/kolmafia/persistence/TCRSDatabase.java 0.00% <0.00%> (ø)
.../sourceforge/kolmafia/request/SendGiftRequest.java 0.00% <0.00%> (ø)
...et/sourceforge/kolmafia/textui/RuntimeLibrary.java 32.95% <0.00%> (-0.03%) ⬇️
...sourceforge/kolmafia/session/EncounterManager.java 38.83% <44.44%> (-0.08%) ⬇️
...c/net/sourceforge/kolmafia/request/ZapRequest.java 33.33% <100.00%> (ø)
...sourceforge/kolmafia/request/SkateParkRequest.java 0.00% <0.00%> (-20.52%) ⬇️
...urceforge/kolmafia/swingui/menu/ScriptMRUList.java 43.66% <0.00%> (-7.05%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7916142...9012fb3. Read the comment docs.

@midgleyc midgleyc merged commit 7c6f78a into kolmafia:main Jan 31, 2022
@midgleyc midgleyc deleted the close-readers branch January 31, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants