提交 9827344c 编写于 作者: J jjh

8005647: langtools/test/tools/javap/MethodParameters.java fails on windows

Summary: Fix javap to not output \r\r\n
Reviewed-by: jjg
上级 317823e0
/*
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -206,7 +206,7 @@ public class ClassWriter extends BasicWriter {
println("minor version: " + cf.minor_version);
println("major version: " + cf.major_version);
if (!options.compat)
writeList("flags: ", flags.getClassFlags(), NEWLINE);
writeList("flags: ", flags.getClassFlags(), "\n");
indent(-1);
constantWriter.writeConstantPool();
} else {
......@@ -383,7 +383,7 @@ public class ClassWriter extends BasicWriter {
println("Signature: " + getValue(f.descriptor));
if (options.verbose && !options.compat)
writeList("flags: ", flags.getFieldFlags(), NEWLINE);
writeList("flags: ", flags.getFieldFlags(), "\n");
if (options.showAllAttrs) {
for (Attribute attr: f.attributes)
......@@ -480,7 +480,7 @@ public class ClassWriter extends BasicWriter {
}
if (options.verbose && !options.compat) {
writeList("flags: ", flags.getMethodFlags(), NEWLINE);
writeList("flags: ", flags.getMethodFlags(), "\n");
}
Code_attribute code = null;
......@@ -749,5 +749,4 @@ public class ClassWriter extends BasicWriter {
private int size;
private ConstantPool constant_pool;
private Method method;
private static final String NEWLINE = System.getProperty("line.separator", "\n");
}
......@@ -23,6 +23,7 @@
/*
* @test
* @bug 8004727
* @summary javac should generate method parameters correctly.
*/
// key: opt.arg.parameters
......
......@@ -23,6 +23,7 @@
/*
* @test
* @bug 8004727 8005647
* @summary javac should generate method parameters correctly.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册