--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java Fri Apr 28 11:06:51 2017 +0100
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java Thu May 04 09:43:12 2017 +0100
@@ -616,8 +616,7 @@
@Override
public Void visitModuleTarget(ModuleTarget_attribute attr, ClassOutputStream out) {
- out.writeShort(attr.os_name_index);
- out.writeShort(attr.os_arch_index);
+ out.writeShort(attr.target_platform_index);
return null;
}
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ModuleTarget_attribute.java Fri Apr 28 11:06:51 2017 +0100
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/ModuleTarget_attribute.java Thu May 04 09:43:12 2017 +0100
@@ -38,8 +38,7 @@
public class ModuleTarget_attribute extends Attribute {
ModuleTarget_attribute(ClassReader cr, int name_index, int length) throws IOException {
super(name_index, length);
- os_name_index = cr.readUnsignedShort();
- os_arch_index = cr.readUnsignedShort();
+ target_platform_index = cr.readUnsignedShort();
}
@Override
@@ -47,6 +46,5 @@
return visitor.visitModuleTarget(this, data);
}
- public final int os_name_index;
- public final int os_arch_index;
+ public final int target_platform_index;
}
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java Fri Apr 28 11:06:51 2017 +0100
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java Thu May 04 09:43:12 2017 +0100
@@ -668,33 +668,19 @@
public Void visitModuleTarget(ModuleTarget_attribute attr, Void ignore) {
println("ModuleTarget:");
indent(+1);
- print("os_name: #" + attr.os_name_index);
- if (attr.os_name_index != 0) {
+ print("target_platform: #" + attr.target_platform_index);
+ if (attr.target_platform_index != 0) {
tab();
- print("// " + getOSName(attr));
- }
- println();
- print("os_arch: #" + attr.os_arch_index);
- if (attr.os_arch_index != 0) {
- tab();
- print("// " + getOSArch(attr));
+ print("// " + getTargetPlatform(attr));
}
println();
indent(-1);
return null;
}
- private String getOSName(ModuleTarget_attribute attr) {
+ private String getTargetPlatform(ModuleTarget_attribute attr) {
try {
- return constant_pool.getUTF8Value(attr.os_name_index);
- } catch (ConstantPoolException e) {
- return report(e);
- }
- }
-
- private String getOSArch(ModuleTarget_attribute attr) {
- try {
- return constant_pool.getUTF8Value(attr.os_arch_index);
+ return constant_pool.getUTF8Value(attr.target_platform_index);
} catch (ConstantPoolException e) {
return report(e);
}