1536 Commits

Author SHA1 Message Date
Srikanth Adayapalam
8afd89977c 8062373: Project Coin: diamond and anonymous classes
Allow diamond inference in combination with anonymous class instance creation

Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Reviewed-by: mcimadamore, vromero
2015-03-30 17:09:14 +05:30
Bhavesh Patel
8b611ba470 8076026: DocTree should parse hyphenated attributes correctly
Reviewed-by: jjg, ksrini
2015-03-28 10:18:27 -07:00
Vicente Romero
38527cecd5 8075184: javac is mistakenly considering an missing enclosing instance error as an overload error
Reviewed-by: mcimadamore
2015-03-27 10:11:21 -07:00
Jan Lahoda
31a45d5c86 8054220: Debugger doesn't show variables *outside* lambda
8058227: Debugger has no access to outer variables inside Lambda

Put local variables captured by lambda into the lambda method's LocalVariableTable.

Reviewed-by: mcimadamore, rfield
2015-03-26 11:34:50 +01:00
Andrei Eremeev
22d4785f1d 8049238: Implement classfile tests for Signature attribute
Reviewed-by: jjg, shurailine, anazarov
2015-03-25 10:29:14 +03:00
Maurizio Cimadamore
24c51e1e1b 8048838: type inference performance regression
Reduce redundant bounds before attempting to do pairwise lub computation during bound incorporation.

Reviewed-by: vromero
2015-03-19 11:40:47 +00:00
Maurizio Cimadamore
c03dd06d9a 8074381: java.lang.AssertionError during compiling
Add extra functional interface check to prevent crash during code generation

Reviewed-by: vromero
2015-03-19 11:39:36 +00:00
Srikanth Adayapalam
f1f1f0f7e1 8074148: Attr.visitBinary flags error at wrong position
Reviewed-by: vromero
2015-03-13 10:25:46 +05:30
Srikanth Adayapalam
c4ebb7f3c0 8071847: java.lang.NullPointerException at com.sun.tools.javac.code.Types.elemtype(Types.java:1870)
Class file reader should recover from malformed class files that contain methods incorrectly flagged as variable arity methods.

Reviewed-by: jlahoda
2015-03-13 13:15:24 +05:30
Srikanth Adayapalam
60841ee270 8050021: Improper "duplicate case label" error
Reviewed-by: jlahoda
2015-03-12 10:24:07 +05:30
Jan Lahoda
fad1792bc4 8071851: Provide filtering of doclint checking based on packages
Introducing -Xdoclint/package:<packages> doclint option to enable/disable checking of specified packages.

Reviewed-by: jjg, darcy
2015-03-11 22:24:05 +01:00
Maurizio Cimadamore
a981871194 8074306: NULLCHK is emitted as Object.getClass
8074501: Javac fix for 8073432 is missing right test BugIDs

Correct test bugIds

Reviewed-by: jjg
2015-03-06 10:30:44 +00:00
Aleksey Shipilev
89cc77c8cb 8073432: Object.getClass() throws stackless NPE, due to C2 intrinsic
Javac should generate NPE checks using Objects.requireNonNull if -target >= 7

Reviewed-by: jlahoda
2015-03-05 15:03:07 +00:00
Srikanth Adayapalam
105275fb87 8071453: Allow interface methods to be private
Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Reviewed-by: mcimadamore
2015-03-02 10:41:08 +05:30
Maurizio Cimadamore
7b2bf7805a 8073842: Invalid method reference when referencing a method on a wildcard type
Method rteference lookup logic doesn't skip type-variables as required by javac.

Reviewed-by: jlahoda
2015-02-27 18:20:33 +00:00
Jan Lahoda
681758e0fa 8067886: Inaccessible nested classes can be incorrectly imported
Check type accessibility at the point of import when importing the type using type-import-on-demand.

Reviewed-by: mcimadamore, jfranck
2015-02-24 16:11:59 +01:00
Maurizio Cimadamore
110a99f0dd 8071291: Compiler crashes trying to cast UnionType to IntersectionClassType
Compiler tests for .isCompound but then cast to a more specific Type subclass, resulting in CCE

Reviewed-by: vromero, jlahoda
2015-02-23 13:02:37 +00:00
Dan Smith
13490088bf 8039214: Inference should not map capture variables to their upper bounds
Update to Types.containsType; related adjustment to most-specific test

Reviewed-by: mcimadamore, vromero
2015-02-20 17:05:13 -07:00
Jan Lahoda
0a57971dd9 8067445: New modular image-based file manager skips boot classes
Taking "sun.boot.class.path" system property into account when constructing bootclasspath for modular images.

Reviewed-by: jjg, mcimadamore
2015-02-17 15:39:05 +01:00
Srikanth Adayapalam
31b752c691 8073201: Incorrect @bug annotation in checkin for JDK-8069545
Reviewed-by: mcimadamore
2015-02-16 19:14:18 +05:30
Maurizio Cimadamore
b91b333053 8071241: Investigate alternate strategy for type-checking operators
Separat operator lookup logic from overload resolution.

Reviewed-by: jjg, jlahoda, sadayapalam
2015-02-16 12:24:25 +00:00
Eric McCorkle
b014a7728f 8066725: javac produces classfiles it cannot read
Revert behavioral changes from 8029012 and 8065132

Reviewed-by: jfranck
2015-02-13 17:00:45 -05:00
Srikanth Adayapalam
cb2a21c5a5 8069545: javac shouldn't check nested stuck lambdas during overload resolution
Nested lambdas should not be considered while overload resolution is in progress

Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
Reviewed-by: mcimadamore
2015-02-12 10:16:19 +05:30
Maurizio Cimadamore
dbe88a2ef1 8072445: tools/javac/lambda/MethodReference55.java fails across platforms
Remove copyright from test header

Reviewed-by: jlahoda
2015-02-05 18:51:09 +00:00
Srikanth Adayapalam
74f6de6859 8069265: ClassCastException when compiled with JDK 9b08+, JDK8 compiles OK
Alternate fix for 8015499 to eliminate extra checkcast (by working around a limitation in Types#asSuper) without the side effect that results in 8069265

Reviewed-by: mcimadamore, jjg
2015-02-02 18:52:16 +05:30
Sonali Goel
b523cb6aaa 8071629: Write new test to test -j switch
Reviewed-by: jjg
2015-01-30 14:59:47 -08:00
Mandy Chung
5035f5b1d4 8068937: jdeps shows "not found" if target class has no reference other than its own package
Reviewed-by: alanb
2015-01-27 19:50:41 -08:00
Sonali Goel
a67e9f2d36 8068463: Group 10c: golden files for tests in tools/javac dir
Reviewed-by: jjg, mcimadamore
2015-01-27 15:11:57 -08:00
Jan Lahoda
edc2052f33 8069254: Warning issued despite @SafeVarargs annotation on constructor
The Symbol created for diamond inference does not have annotations attached - need to look for @SafeVarargs on the underlying constructor's Symbol.

Reviewed-by: mcimadamore
2015-01-23 15:14:53 +01:00
Srikanth Adayapalam
25c0dd9958 8071310: Tests missing for checkin for JDK-8046977
Reviewed-by: jlahoda
2015-01-22 09:50:03 +01:00
Joel Borggrén-Franck
4b78cb3eb7 8070507: LambdaLambdaSerialized can fail in -agentvm mode
Reviewed-by: mcimadamore
2015-01-21 19:02:20 +01:00
Jan Lahoda
8944d18416 8069094: SuppressWarnings(\"deprecation\") not respected on default clause on annotation declarations
Properly deferring warnings that are reported during entering of annotation's default value.

Reviewed-by: mcimadamore
2015-01-20 12:00:25 +01:00
Srikanth Adayapalam
671f90ddc7 8052070: javac crashes when there are duplicated type parameters
Avoid eager completion of ClassSymbol while type parameters are being processed.

Reviewed-by: jlahoda, mcimadamore
2015-01-20 09:51:17 +01:00
Robert Field
6c9d4861a9 8068488: Facilitate extension of the javac parser -- missing modifier
Reviewed-by: jjg
2015-01-16 20:03:30 -08:00
Jan Lahoda
56c4de876e 8068517: Compiler may generate wrong InnerClasses attribute for static enum reference
Making sure enum's abstractness is resolved before writing InnerClasses entry about it.

Reviewed-by: mcimadamore
2015-01-16 14:47:25 +01:00
Maurizio Cimadamore
82db21e08d 8068995: Cleanup method reference lookup code
Simplify method reference code lookup and generate better/more uniform diagnostics

Reviewed-by: vromero
2015-01-15 13:58:11 +00:00
Jan Lahoda
1b90760ef4 8066843: Messager.printMessage cannot print multiple errors for same source position
Using a DiagnosticFlag to mark diagnostics that should be always printed even if multiple of them have the same source position.

Reviewed-by: darcy, jjg, mcimadamore
2015-01-13 19:13:42 +01:00
Srikanth Adayapalam
2b3c75aa36 8027888: javac wrongly allows annotations in array-typed class literals
Compiler incorrectly accepts type annotations on array-typed class literals.

Reviewed-by: jlahoda, jfranck
2015-01-13 10:36:41 +01:00
Srikanth Adayapalam
5cb253a2e9 8068254: Method reference uses wrong qualifying type
Generated code fails with IllegalAccessError due to compiler's mishandling of packageprivate classes in method reference expressions.

Reviewed-by: rfield, mcimadamore
2015-01-13 10:32:19 +01:00
Srikanth Adayapalam
33a3e1add3 8037546: javac -parameters does not emit parameter names for lambda expressions
MethodParameters attribute is missing for synthetic methods encoding lambda expressions.

Reviewed-by: rfield, mcimadamore
2015-01-13 10:25:24 +01:00
Srikanth Adayapalam
1be81e358c 8062358: ClassCastException in TransTypes.visitApply
Incorrect handling of subtype relations involving lower bounded wildcard causes ClassCastException

Reviewed-by: vromero, dlsmith
2015-01-13 10:17:25 +01:00
Jonathan Gibbons
01520ed2aa 8068759: ConstFoldTest fails on Windows
Reviewed-by: ksrini
2015-01-09 18:03:01 -08:00
Srikanth Adayapalam
4eb573aa81 8067914: Redundant type cast nodes in AST (follow up from JDK-8043741)
Workaround for redundant (but harmless) synthetic cast generated in TransTypes

Reviewed-by: mcimadamore
2015-01-09 15:51:20 +00:00
Srikanth Adayapalam
7e499fd15b 8067429: java.lang.VerifyError: Inconsistent stackmap frames at branch target
Bitset for alive variables contains info about variables out of range

Reviewed-by: mcimadamore
2015-01-09 15:50:22 +00:00
Srikanth Adayapalam
5de84c2836 8043741: VerifyError due to missing checkcast
Proto-type is not set correctly for NULLCHK synthetic trees

Reviewed-by: mcimadamore
2015-01-09 15:49:42 +00:00
Srikanth Adayapalam
0eb55d78b6 8066871: java.lang.VerifyError: Bad local variable type - local final String
BaseType() erroneously called on MethodResultInfo causes lack of constant type info

Reviewed-by: jlahoda, mcimadamore
2015-01-09 15:48:09 +00:00
Sonali Goel
274f997aee 8058373: Group 10a: golden files for tests in tools/javac dir
Reviewed-by: jjg, darcy
2015-01-08 22:01:20 -08:00
Maurizio Cimadamore
56a33e4541 8058542: Devise scheme for better diagnostic creation
Add support for generating (at build-time) an enum-like class containing all javac diagnostics, which allows for safe diagnostic creation.

Reviewed-by: jlahoda, jjg, vromero, erikj, jfranck
2015-01-08 14:43:05 +00:00
Joe Darcy
5cb7065612 8068639: Make certain annotation classfile warnings opt-in
Reviewed-by: jjg
2015-01-07 17:06:47 -08:00
Jonathan Gibbons
e6ea1f0ff8 8059977: StandardJavaFileManager should support java.nio.file.Path
Reviewed-by: jlahoda
2015-01-06 14:51:10 -08:00