8138729: javac -parameters should not emit parameter names for lambda expressions

Reviewed-by: mcimadamore
This commit is contained in:
Srikanth Adayapalam 2015-10-21 17:52:43 +05:30
parent 08b811e8d6
commit 32cea7c65b
6 changed files with 19 additions and 17 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2015 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
@ -277,7 +277,7 @@ public class ReflectionVisitor extends Tester.Visitor {
param = "final " + param;
}
sb.append(sep).append(param);
if (!m.isBridge() && !m.getName().startsWith("lambda$") && !expect.equals(param)) {
if (!m.isBridge() && !expect.equals(param)) {
error(prefix + "param[" + i + "]='"
+ param + "' expected '" + expect + "'");
break;