Skip to content

Commit

Permalink
fixed non-deterministic iteration order over input archives
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbehr committed May 13, 2024
1 parent 0e50d9c commit 04f694a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.1.1]

### Fixed
- Process files in the order they appear in the respective input archives or directories.
This fixes a regression that was introduced with directory support in version 3.0.0.

## [4.1.0]

### Added
Expand Down Expand Up @@ -77,8 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support `ASM7` and Java 13 in both YShrink and YGuard

### Fixed

- Use a empty manifest in `JarWriter` where the shrinker would previously crash when no manifest was present
- Use an empty manifest in `JarWriter` where the shrinker would previously crash when no manifest was present
- Use Gradle wrapper with Gradle version 5.6.4 for reproducible builds

## [2.9.2] - 2019-12-09
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR=4.1
VERSION_MINOR=0
VERSION_MINOR=1-SNAPSHOT

POM_DESCRIPTION=The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
POM_URL=https://github.com/yWorks/yGuard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
Expand All @@ -25,7 +25,7 @@
*/
public class DirectoryWrapper extends SimpleFileVisitor<Path> implements Archive {
private File directory;
private Map<Entry, File> entries = new HashMap<>();
private Map<Entry, File> entries = new LinkedHashMap<>();

/**
* Instantiates a new Directory wrapper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.io.InputStream;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
Expand All @@ -25,7 +25,7 @@ public class JarFileWrapper implements Archive {
/**
* The Entries.
*/
Map<Entry, JarEntry> entries = new HashMap<>();
Map<Entry, JarEntry> entries = new LinkedHashMap<>();

/**
* Instantiates a new Jar file wrapper.
Expand Down Expand Up @@ -66,5 +66,4 @@ public InputStream getInputStream( final Entry entry ) throws IOException {
public void close() throws IOException {
jarFile.close();
}

}

0 comments on commit 04f694a

Please sign in to comment.