Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/org.eclipse.mat.api/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Bundle-Activator: org.eclipse.mat.internal.MATPlugin
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: registered
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-Localization: plugin
Bundle-Copyright: Copyright (c) 2008, 2022 SAP AG, IBM Corporation and others.
All rights reserved. This program and the accompanying materials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ private String getRetainedHeapTopConsumersDescription(int[] objects, IProgressLi
boolean multipleItems = entries.size() > 1 && topItems > 1;
PriorityQueue<Entry<Integer, Long>> pq = new PriorityQueue<Entry<Integer, Long>>(entries.size(),
(e1, e2) -> e2.getValue().compareTo(e1.getValue()));
pq.addAll(entries);
entries.forEach(e -> pq.add(Map.entry(e.getKey(), e.getValue())));
int maxItems = Math.min(pq.size(), topItems);
while (maxItems-- > 0 && pq.size() > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Map;
import java.util.function.Supplier;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import org.eclipse.mat.SnapshotException;
import org.eclipse.mat.collect.ArrayInt;
import org.eclipse.mat.internal.Messages;
Expand Down Expand Up @@ -157,6 +158,7 @@ private static IObject resolveContextClassLoader(ThreadInfoImpl info)
return null;
}

@CheckForNull
private static Boolean resolveIsDaemon(IObject thread)
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public TreePathBuilder addSibling(int objectId, boolean select)

public IResultTree build(ISnapshot snapshot)
{
return new NodeResult(snapshot, root, base, false, incoming);
return new NodeResult(snapshot, root, base, incoming);
}
}

Expand All @@ -117,7 +117,6 @@ public IResultTree build(ISnapshot snapshot)
private static class Node
{
int ownId;
String attributeName;
List<Node> children;
boolean isExpanded;
boolean isSelected;
Expand Down Expand Up @@ -175,15 +174,13 @@ private static Column col_percent()
private ISnapshot snapshot;
private Node invisibleRoot;
private long base;
private boolean decorateWithAttributeName;
private Boolean incoming;

private NodeResult(ISnapshot snapshot, Node root, long base, boolean decorateWithAttributeName, Boolean incoming)
private NodeResult(ISnapshot snapshot, Node root, long base, Boolean incoming)
{
this.snapshot = snapshot;
this.invisibleRoot = root;
this.base = base;
this.decorateWithAttributeName = decorateWithAttributeName;
this.incoming = incoming;
}

Expand All @@ -195,20 +192,6 @@ public ResultMetaData getResultMetaData()
public Column[] getColumns()
{
Column classNameCol = new Column(Messages.Column_ClassName, String.class);
if (decorateWithAttributeName)
classNameCol.decorator(new IDecorator()
{
public String prefix(Object row)
{
return ((Node) row).attributeName;
}

public String suffix(Object row)
{
return null;
}
});

if (base > 0)
return new Column[] { classNameCol, COL_HEAP, COL_RETAINED, col_percent() };
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1042,19 +1042,15 @@ private Object[][] buildArgs(Map<String, String> mapVals, Map<Enum, String> enum
enumVals.put(Month.of(i), values[i]);
}
SimpleType<String> st[] = Collections.nCopies(COUNT, SimpleType.STRING).toArray(new SimpleType[COUNT]);
CompositeType ct1;
TabularType tt1;
try
{
// keys[], values[] is 1-offset, we need 0-offset
ct1 = new CompositeType("composite test", "a composite type", mapVals.keySet().toArray(new String[COUNT]), mapVals.values().toArray(new String[COUNT]), st);
tt1 = new TabularType("tabular test", "testing tabular types with strings", ct1, mapVals.keySet().toArray(new String[COUNT]));
CompositeType ct1 = new CompositeType("composite test", "a composite type", mapVals.keySet().toArray(new String[COUNT]), mapVals.values().toArray(new String[COUNT]), st);
new TabularType("tabular test", "testing tabular types with strings", ct1, mapVals.keySet().toArray(new String[COUNT]));
}
catch (OpenDataException e)
{
e.printStackTrace();
ct1 = null;
tt1 = null;
}
Map<String,String>mapVals2 = new HashMap<String,String>(mapVals);
// Arguments
Expand Down
Loading