mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6882207: Convert javap to use diamond operator internally
Reviewed-by: jjg
This commit is contained in:
parent
d33a689b96
commit
30de320c01
3 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -128,7 +128,7 @@ public class CodeWriter extends BasicWriter {
|
||||||
}
|
}
|
||||||
// where
|
// where
|
||||||
Instruction.KindVisitor<Void,Integer> instructionPrinter =
|
Instruction.KindVisitor<Void,Integer> instructionPrinter =
|
||||||
new Instruction.KindVisitor<Void,Integer>() {
|
new Instruction.KindVisitor<>() {
|
||||||
|
|
||||||
public Void visitNoOperands(Instruction instr, Integer indent) {
|
public Void visitNoOperands(Instruction instr, Integer indent) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -60,7 +60,7 @@ public class ConstantWriter extends BasicWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void writeConstantPool(ConstantPool constant_pool) {
|
protected void writeConstantPool(ConstantPool constant_pool) {
|
||||||
ConstantPool.Visitor<Integer, Void> v = new ConstantPool.Visitor<Integer,Void>() {
|
ConstantPool.Visitor<Integer, Void> v = new ConstantPool.Visitor<>() {
|
||||||
public Integer visitClass(CONSTANT_Class_info info, Void p) {
|
public Integer visitClass(CONSTANT_Class_info info, Void p) {
|
||||||
print("#" + info.name_index);
|
print("#" + info.name_index);
|
||||||
tab();
|
tab();
|
||||||
|
@ -545,6 +545,6 @@ public class ConstantWriter extends BasicWriter {
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClassWriter classWriter;
|
private final ClassWriter classWriter;
|
||||||
private Options options;
|
private final Options options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
|
||||||
|
|
||||||
private Diagnostic<JavaFileObject> createDiagnostic(
|
private Diagnostic<JavaFileObject> createDiagnostic(
|
||||||
final Diagnostic.Kind kind, final String key, final Object... args) {
|
final Diagnostic.Kind kind, final String key, final Object... args) {
|
||||||
return new Diagnostic<JavaFileObject>() {
|
return new Diagnostic<>() {
|
||||||
public Kind getKind() {
|
public Kind getKind() {
|
||||||
return kind;
|
return kind;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue