Skip to content

Commit

Permalink
Bug 569665 Enable parsing of compressed files created by OpenJDK >= 15
Browse files Browse the repository at this point in the history
Tidy argument tables and fix chunked files with old Gzip

Change-Id: I63de5c58511c21c987e4dad5d3df2cf72e0190bc
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=569665
  • Loading branch information
ajohnson1 committed Apr 20, 2021
1 parent 8098214 commit 2206a89
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 2206a89

Please sign in to comment.