commit | f97f15f2e6c0380060d38cee4d1fd5f7ed9891be | [log] [tgz] |
---|---|---|
author | Goktug Gokdogan <goktug@google.com> | Thu May 26 19:50:24 2016 -0700 |
committer | Goktug Gokdogan <goktug@google.com> | Thu May 26 19:50:24 2016 -0700 |
tree | 0389dd3db17aa1263a0a0975848bb753b5bfe779 | |
parent | d36ff4ee5f9e63494a8a46ba0ebbf616062ffdcc [diff] |
Fixes GC issue in the ResourceAccumulatorTest. Change-Id: Id24480e50dd4af16aab2413ef49edc00250344ca
diff --git a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceAccumulatorTest.java b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceAccumulatorTest.java index 545f513..c8d6de3 100644 --- a/dev/core/test/com/google/gwt/dev/resource/impl/ResourceAccumulatorTest.java +++ b/dev/core/test/com/google/gwt/dev/resource/impl/ResourceAccumulatorTest.java
@@ -271,8 +271,12 @@ return list; } - private static PathPrefixSet createInclusivePathPrefixSet() { - PathPrefixSet pathPrefixes = new PathPrefixSet(); + private PathPrefixSet pathPrefixes; + + private PathPrefixSet createInclusivePathPrefixSet() { + // Set to a field to create a strong reference, otherwise will get GCed as ResourceAccumulator + // refers to it weakly. + pathPrefixes = new PathPrefixSet(); pathPrefixes.add(new PathPrefix("", null)); return pathPrefixes; }