Skip to content

Commit fe97152

Browse files
committed
test for null removed; toArray() fixed
1 parent 552ff04 commit fe97152

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

visualvm/jfr/src/org/graalvm/visualvm/jfr/impl/JFRSnapshotProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void run() {
170170

171171
try {
172172
JFRSnapshotImpl newJFRSnapshot = new JFRSnapshotImpl(new File(jfrSnapshotFile), storage);
173-
if (newJFRSnapshot != null) new SnapshotAdder(newJFRSnapshot, storage, propNames, propValues).execute();
173+
new SnapshotAdder(newJFRSnapshot, storage, propNames, propValues).execute();
174174
} catch (Exception e) {
175175
LOGGER.log(Level.SEVERE, "Error creating JFR snapshot", e); // NOI18N
176176
}
@@ -227,7 +227,7 @@ private static void notifyUnresolvedJFRSnapshots(final Set<File> unresolvedJFRSn
227227
public void run() {
228228
JPanel messagePanel = new JPanel(new BorderLayout(5, 5));
229229
messagePanel.add(new JLabel(NbBundle.getMessage(JFRSnapshotProvider.class, "MSG_Unresolved_CoreDumps")), BorderLayout.NORTH); // NOI18N
230-
JList<File> list = new JList<>(unresolvedJFRSnapshotsS.toArray(new File[0]));
230+
JList<String> list = new JList<>(unresolvedJFRSnapshotsS.toArray(new String[0]));
231231
list.setVisibleRowCount(4);
232232
messagePanel.add(new JScrollPane(list), BorderLayout.CENTER);
233233
NotifyDescriptor dd = new NotifyDescriptor(

0 commit comments

Comments
 (0)