Skip to content

Commit

Permalink
Generalize workspace exporting a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Aug 12, 2023
1 parent da896c6 commit 67643ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,13 @@ private void populate(Workspace workspace) {
*/
private void mapInto(Map<String, byte[]> map, WorkspaceResource resource) {
// Place classes into map
for (JvmClassInfo classInfo : resource.getJvmClassBundle()) {
String key = classInfo.getName() + ".class";
map.put(key, classInfo.getBytecode());
updateProperties(key, classInfo);
}
resource.jvmClassBundleStream().forEach(bundle -> {
for (JvmClassInfo classInfo : bundle) {
String key = classInfo.getName() + ".class";
map.put(key, classInfo.getBytecode());
updateProperties(key, classInfo);
}
});

// Place versioned files into map
for (Map.Entry<Integer, JvmClassBundle> entry : resource.getVersionedJvmClassBundles().entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ public Map<Integer, JvmClassBundle> getJvmClassloaderBundles() {
}

@Override
@SuppressWarnings("unchecked")
public Stream<JvmClassBundle> jvmClassBundleStream() {
return (Stream<JvmClassBundle>) (Object) remoteBundleMap.values().stream();
return Stream.concat(super.jvmClassBundleStream(), remoteBundleMap.values().stream());
}

@Override
Expand Down

0 comments on commit 67643ee

Please sign in to comment.