< prev index next > src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java
Print this page
} else if (!parent.mkdirs()) {
throw TASK_HELPER.newBadArgs("err.cannot.create.dir",
parent.getAbsolutePath());
}
! if (!ImageResourcesTree.isTreeInfoResource(name)) {
Files.write(resource.toPath(), bytes);
}
}
private static final int OFFSET_WIDTH = 12;
} else if (!parent.mkdirs()) {
throw TASK_HELPER.newBadArgs("err.cannot.create.dir",
parent.getAbsolutePath());
}
! if (location.getType() == ImageLocation.LocationType.RESOURCE) {
Files.write(resource.toPath(), bytes);
}
}
private static final int OFFSET_WIDTH = 12;
if (!match) {
continue;
}
! if (!ImageResourcesTree.isTreeInfoResource(name)) {
if (moduleAction != null) {
! int offset = name.indexOf('/', 1);
!
! String newModule = offset != -1 ?
! name.substring(1, offset) :
- "<unknown>";
-
if (!oldModule.equals(newModule)) {
moduleAction.apply(reader, oldModule, newModule);
oldModule = newModule;
}
}
-
- ImageLocation location = reader.findLocation(name);
resourceAction.apply(reader, name, location);
}
}
}
} catch (IOException ioe) {
if (!match) {
continue;
}
! ImageLocation location = reader.findLocation(name);
+ if (location.getType() == ImageLocation.LocationType.RESOURCE) {
if (moduleAction != null) {
! String newModule = location.getModule();
! if (newModule.isEmpty()) {
! newModule = "<unknown>";
! }
if (!oldModule.equals(newModule)) {
moduleAction.apply(reader, oldModule, newModule);
oldModule = newModule;
}
}
resourceAction.apply(reader, name, location);
}
}
}
} catch (IOException ioe) {
< prev index next >