diff --git a/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/CompressedRandomAccessFile.java b/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/CompressedRandomAccessFile.java index f1b84695a..77d46b17e 100644 --- a/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/CompressedRandomAccessFile.java +++ b/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/CompressedRandomAccessFile.java @@ -224,11 +224,10 @@ static long estimatedLength(RandomAccessFile ra) throws IOException if (e3 >= 0 && Math.abs(e3 - estimate) < Math.abs(best - estimate)) best = e3; /* - * Attempt to detect a chunked file and round up the size - * to at least 4GB so the parser doesn't throw an error with an inaccurate size + * Attempt to detect a chunked file. */ - if (best < 0x100000000L && len32 <= 1024 * 1024) - best = 0x100000000L; + if ((len32 <= filel || len32 <= 1024 * 1024)) + best = Long.MAX_VALUE; return best; } else diff --git a/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/GZIPInputStream2.java b/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/GZIPInputStream2.java index 782daded8..c5a8efd83 100644 --- a/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/GZIPInputStream2.java +++ b/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/GZIPInputStream2.java @@ -37,7 +37,6 @@ public class GZIPInputStream2 extends FilterInputStream long uncompressedLen; long uncompressedLocationAtHeader; CRC32 crc; - boolean checkcrc; String comment; String filename; public GZIPInputStream2(GZIPInputStream2 gs) throws IOException diff --git a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/acquire/AcquireDialog.java b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/acquire/AcquireDialog.java index 9b3957dfa..1ff43125e 100644 --- a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/acquire/AcquireDialog.java +++ b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/acquire/AcquireDialog.java @@ -65,7 +65,6 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Label; diff --git a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/query/arguments/ArgumentsTable.java b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/query/arguments/ArgumentsTable.java index b8a1be958..c7b23e3e1 100644 --- a/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/query/arguments/ArgumentsTable.java +++ b/plugins/org.eclipse.mat.ui/src/org/eclipse/mat/ui/internal/query/arguments/ArgumentsTable.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008, 2020 SAP AG, IBM Corporation and others. + * Copyright (c) 2008, 2021 SAP AG, IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * + * https://www.eclipse.org/legal/epl-2.0/ + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: @@ -361,6 +361,8 @@ private void addEditorRow(ArgumentDescriptor descriptor, String flag, Object val aec.addListener(this); // ugly: w/o pack, the table does not redraw the editors correctly + table.layout(); + table.getParent().layout(); table.pack(); table.getParent().pack();