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

6674: Use try-with-resource in more places and close un-closed resources #33

Closed
wants to merge 3 commits into from

Conversation

@Gunde
Copy link

Gunde commented Jan 15, 2020

This PR fixes a few places where we didn't close resources properly before and also changes a number of older usages of IOToolkit to instead use try-with-resource.

Progress

  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

JMC-6674: Inefficient finding of first start time and first & last end times

Approvers

  • Marcus Hirt (hirt - Reviewer)
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 15, 2020

👋 Welcome back hdafgard! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@openjdk openjdk bot added the rfr label Jan 15, 2020
@mlbridge
Copy link

mlbridge bot commented Jan 15, 2020

Webrevs

@openjdk openjdk bot removed the rfr label Jan 17, 2020
@openjdk
Copy link

openjdk bot commented Jan 17, 2020

@Gunde This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

6674: Use try-with-resource in more places and close un-closed resources

Reviewed-by: hirt
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 2 commits pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to do this manually, please merge master into your branch first.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 17, 2020
@Gunde
Copy link
Author

Gunde commented Jan 17, 2020

/integrate

@openjdk openjdk bot closed this Jan 17, 2020
@openjdk openjdk bot added integrated and removed ready labels Jan 17, 2020
@openjdk
Copy link

openjdk bot commented Jan 17, 2020

@Gunde The following commits have been pushed to master since your change was applied:

  • 8790592: 6668: Move org.openjdk.jmc.jdp bundle from application to core
  • f74caa8: 6549: Color flame chart based on package name

Your commit was automatically rebased without conflicts.

Pushed as commit ea933fa.

@mlbridge
Copy link

mlbridge bot commented Jan 17, 2020

Mailing list message from Henrik Dafgård on jmc-dev:

Changeset: ea933fa
Author: Henrik Dafg?rd <hdafgard at openjdk.org>
Date: 2020-01-17 14:25:45 +0000
URL: https://git.openjdk.java.net/jmc/commit/ea933fab

6674: Use try-with-resource in more places and close un-closed resources

Reviewed-by: hirt

! application/org.openjdk.jmc.console.jconsole/src/main/java/org/openjdk/jmc/console/jconsole/JConsolePluginLoader.java
! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/action/TriggerActionStartTimeBoundRecording.java
! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/action/WriteAndOpenRecordingJob.java
! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/tab/TriggerToolkit.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/configuration/model/xml/XMLModel.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/DumpAnyRecordingAction.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/EditRecordingAction.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/StartRecordingAction.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/jobs/UpdateRecordingJob.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/EventConfiguration.java
! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/PrivateStorageDelegate.java
! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/RecordingLoader.java
! application/org.openjdk.jmc.ide.launch/src/main/java/org/openjdk/jmc/ide/launch/JfrLaunchDelegateHelper.java
! application/org.openjdk.jmc.ide.launch/src/main/java/org/openjdk/jmc/ide/launch/model/JfrLaunchModel.java
! application/org.openjdk.jmc.joverflow/src/main/java/org/openjdk/jmc/joverflow/heap/parser/ReadBuffer.java
! application/org.openjdk.jmc.joverflow/src/main/java/org/openjdk/jmc/joverflow/util/FileUtils.java
! application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/logging/LoggingToolkit.java
! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/persistence/internal/PersistenceFile.java
! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/subscription/internal/FileMRIMetadata.java
! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/triggers/internal/NotificationRuleBag.java
! application/org.openjdk.jmc.ui.common/src/main/java/org/openjdk/jmc/ui/common/util/MCVersion.java
! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/EventConfigurationModelTest.java
! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/EventConfigurationTest.java
! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/JfrControlTestCase.java
! application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/JfrPackageExampleTest.java
! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/DefaultServicesTest.java
! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/PackageExampleTest.java
! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/services/ServicesPackageExampleTest.java
! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/subscription/MRIMetadataServiceTest.java
! application/uitests/org.openjdk.jmc.flightrecorder.uitest/src/test/java/org/openjdk/jmc/flightrecorder/uitest/JfrMetadataToolkit.java
! application/uitests/org.openjdk.jmc.flightrecorder.uitest/src/test/java/org/openjdk/jmc/flightrecorder/uitest/MetadataTestBase.java
! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/Agent.java
! core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/util/TestToolkit.java
! core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/io/IOToolkit.java
! core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/util/XmlToolkit.java
! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/JfrLoaderToolkit.java
! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/EventAppearance.java
! core/tests/org.openjdk.jmc.flightrecorder.rules.jdk.test/src/test/java/org/openjdk/jmc/flightrecorder/test/rules/jdk/TestRulesWithJfr.java

@Gunde Gunde deleted the Gunde:close-streams branch Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.