Commit Graph

1120 Commits

Author SHA1 Message Date
Matherey Nunez
0c38c2d401 8027477: Enable repeating annotations test cases since JDK-8004912 is fixed
Reviewed-by: jjg, jfranck
2014-01-22 12:22:23 -08:00
Alexander Zuev
bb0c5d0f71 Merge 2014-01-20 19:11:58 +04:00
Joe Darcy
4fa17d99b2 8031375: Revert test exclusions after fix for JDK-8030656 propagates
Reviewed-by: mduigou
2014-01-18 10:47:30 -08:00
Abhijit Saha
69a1d18d40 Merge 2014-01-16 21:46:01 -08:00
Joe Darcy
87dec1fa1a 8031745: Remove unneeded/obsolete -source/-target options in javac tests, part 1
Reviewed-by: jjg, sogoel
2014-01-16 18:00:25 -08:00
Abhijit Saha
d9ec81d45f Merge 2014-01-15 10:18:06 -08:00
Jan Lahoda
9a0f6ed18e 8028576: Incorrect RuntimeVisibleTypeAnnotations for exception parameters when not generating debuging info
The exception parameters with type annotations need to be added into the varBuffer even if not generating debug info

Reviewed-by: jjg, emc
2014-01-15 13:49:57 +01:00
Joel Borggrén-Franck
b3e2823f53 8029690: Move symbol creation from ClassReader to Symtab
Reviewed-by: jjg
2014-01-15 10:57:25 +01:00
Abhijit Saha
c575ece03d Merge 2014-01-14 08:08:32 -08:00
Jan Lahoda
8a2542c71f 8030049: RoundEnvironment.getElementsAnnotatedWith receives wrong elements
Match the required and actual annotations using Element equivalence rather than TypeMirror equivalence, to avoid trouble with erroneous types.

Reviewed-by: darcy
2014-01-10 19:02:54 +01:00
Andreas Lundblad
a76d1ab5a2 8028389: NullPointerException compiling annotation values that have bodies
Made sure anonymous class declarations inside class- and package-level annotations are properly entered.

Reviewed-by: jfranck
2014-01-10 12:47:15 +01:00
Jan Lahoda
e32b40185e 8029376: Full attribution of unresolvable annotations
8029161: javac crashing when processing broken annotations

Attributing values of annotation attributes regardless how broken the annotation is.

Reviewed-by: jjg, jfranck
2014-01-10 11:31:09 +01:00
Joe Darcy
3815f04fbc 8000962: Update JDK_MINOR_VERSION for JDK 9
Reviewed-by: jjg, ksrini
2014-01-07 15:00:23 -08:00
Joe Darcy
dd72fa55fc 8031360: Update langtools code base to use RELEASE_9
Reviewed-by: jjg
2014-01-07 13:47:49 -08:00
Joe Darcy
6fc7157058 8028543: Add SourceVersion.RELEASE_9
Reviewed-by: jjg
2014-01-07 11:43:56 -08:00
Steve Sides
4cbb43a7e3 8029230: Update copyright year to match last edit in jdk8 langtools repository for 2013
Reviewed-by: ksrini
2013-12-24 09:17:37 -08:00
Robert Field
8d4ba575b6 8030626: java.lang.VerifyError: Bad return type when lambda's body is in parentheses
Properly type convert the body of a lambda expression (forward port to JDK9 of 8029558)

Reviewed-by: vromero
2013-12-22 21:57:01 -08:00
Vicente Romero
b0f5f93cd0 8029240: Default methods not always visible under -source 7
Reviewed-by: jjg
2013-12-19 22:24:27 +00:00
Vicente Romero
a4bac02fa4 8030218: javac, compile time error isn't shown when final static field is not assigned, follow-up
Reviewed-by: jjg, jfranck, sundar
2013-12-19 21:58:50 +00:00
Paul Govereau
4d793c02be 8030726: tools/javac/NoStringToLower.java fails due to enforcement no use of String.toLowerCase on non-langtools classes
Fix NoStringToLower test to only enforce ban on String.toLowerCase on langtools classes

Reviewed-by: vromero, jfranck
2013-12-19 11:38:45 -05:00
Vicente Romero
6255412f38 8029721: javac crash for annotated parameter type of lambda in a field
Reviewed-by: rfield, jfranck
2013-12-18 19:22:58 +00:00
Vicente Romero
7f46fe764f 8029569: internal javac cast exception when resolving varargs ambiguity
Reviewed-by: jjg
2013-12-18 19:15:58 +00:00
Eric McCorkle
bedae747dc 8030687: Add .out files to fix failing tests
Forgot to hg add golden files in a previous fix

Reviewed-by: jjg
2013-12-17 19:27:49 -05:00
Paul Govereau
a183356fde 8030642: Add golden files to javac/limits
Add golden files to check output of negative compilation tests in javac/limits

Reviewed-by: jjg, emc
2013-12-17 18:15:48 -05:00
Jan Lahoda
0f0e04b6a0 8028235: Better error recovery for parsing 'void' as a type of the lambda parameter
Handle "void" as a primitive type in JavacParser.analyzeParens.

Reviewed-by: vromero
2013-12-17 10:58:26 +01:00
Jan Lahoda
92c25244aa 8028415: TreeMaker.Literal(Object) creates invalid JCLiterals when passed a Character
JCLiteral for char must contain an Integer, not the provided Character.

Reviewed-by: jjg
2013-12-17 10:58:21 +01:00
Jan Lahoda
8ebb81fb7a 8029800: Flags.java uses String.toLowerCase without specifying Locale
Introducing StringUtils.toLowerCase/toUpperCase independent on the default locale, converting almost all usages of String.toLowerCase/toUpperCase to use the new methods.

Reviewed-by: jjg, bpatel
2013-12-17 10:55:59 +01:00
Jan Lahoda
b06d1bfb55 8029715: test needs bugID added to @bug tag
Adding forgotten bug number

Reviewed-by: vromero
2013-12-17 10:55:58 +01:00
Joe Darcy
b2651d0972 8028545: Add -source 9 and -target 9 to javac
8000961: Change javac source and target default to 9

Reviewed-by: jjg
2013-12-16 10:15:38 -08:00
Vicente Romero
ffb2f48033 8030214: fix for JDK-8020216 breaks the build
Reviewed-by: jjg
2013-12-16 17:33:18 +00:00
Andrey Nazarov
213b16163b 8028708: TEST_BUG, Tests should pass through VM options, langtools tests
Reviewed-by: jjg, vromero
2013-12-16 15:07:13 +00:00
Vicente Romero
4d99383951 8020216: javac, compile time error isn't shown when final static field is not assigned
Reviewed-by: jjg
2013-12-16 14:32:12 +00:00
Vicente Romero
a64e195ca9 8029179: javac produces a compile error for valid boolean expressions
Reviewed-by: jjg, jlahoda
2013-12-03 18:13:18 +00:00
Werner Dietl
e2d2bb9a25 8028699: Compiler crash during speculative attribution of annotated type
Moving the checkForDeclarationAnnotations check into Attr.TypeAnnotationsValidator

Reviewed-by: jjg
2013-12-03 18:50:26 +01:00
Jan Lahoda
51d11b5222 8027789: Access method for Outer.super.m() references indirect superclass
Internally convert the qualified super access to an equivalent of an unqualified super access inside the access method.

Reviewed-by: vromero, jjg
2013-11-26 15:33:12 +01:00
Jan Lahoda
38ef229e3f 8026374: javac accepts void as a method parameter
Changing Check.validate to reject void types.

Reviewed-by: jjg, vromero
2013-11-26 15:27:19 +01:00
Joel Borggrén-Franck
979151dfa9 8028428: strictfp allowed as annotation element modifier
Reviewed-by: jjg
2013-11-26 13:33:33 +01:00
Robert Field
14ae524304 8028739: javac generates incorrect descriptor for MethodHandle::invoke
Introduce special handling for signature polymorphic methods

Reviewed-by: jjg
2013-11-22 17:07:35 -08:00
Jan Lahoda
5fd77a7cef 6557966: Multiple upper bounds of the TypeVariable
Adjusting javax.lang.model javadoc regarding IntersectionType, IntersectionType.accept now calls visitIntersection for all kinds of IntersectionTypes.

Co-authored-by: Joe Darcy <joe.darcy@oracle.com>
Reviewed-by: darcy, vromero
2013-11-20 13:44:39 +01:00
Vicente Romero
f4c2201eb4 8028504: javac generates LocalVariableTable even with -g:none
Reviewed-by: jjg, jlahoda
2013-11-19 23:35:43 +00:00
Vicente Romero
e6e0508e1a 8026231: Look at 'static' flag when checking method references
Reviewed-by: jjg, dlsmith
2013-11-15 11:08:12 +00:00
Vicente Romero
34a6de55b2 8026963: type annotations code crashes for code with erroneous trees
Reviewed-by: jjg, jlahoda
2013-11-14 19:28:20 +00:00
Eric McCorkle
71adca3d64 8028282: Remove @ignore from test langtools/test/tools/javac/T7042623.java
Remove @ignore from test

Reviewed-by: jjg
2013-11-14 12:32:57 -05:00
Sonali Goel
b941719f94 8025113: Convert 7 tools TryWithResources tests to jtreg format
Reviewed-by: darcy, jjg
2013-11-13 16:36:08 -08:00
Joel Borggrén-Franck
f3cb828db7 8027375: javac asserts on nested erroneous annotations
Make sure JCAnnotation trees have type != null before annotation processing

Reviewed-by: jjg
2013-11-11 17:26:09 +01:00
Eric McCorkle
44f29ffde7 8027439: Compile-time error in the case of ((Integer[] & Serializable)new Integer[1]).getClass()
8027253: javac illegally accepts array as bound

Backing out change allowing arrays in intersection types

Reviewed-by: vromero
2013-11-11 09:47:46 -05:00
Jan Lahoda
d3eb4e0816 8027142: Invokedynamic instructions don't get line number table entries
When emitting invokedynamic instruction, write pendingStatPos, if set, into the LineNumberTable. Invokedynamic itself does not set the pendingStatPos.

Reviewed-by: jjg, jrose, ksrini, vromero
2013-11-09 15:24:38 +01:00
Joe Darcy
d9cc608057 8027730: Fix release-8 type visitors to support intersection types
Reviewed-by: jjg, jlahoda, sogoel
2013-11-07 20:11:56 -08:00
Jan Lahoda
e9f9c31086 8027281: Incorrect invokespecial generated for JCK lang EXPR/expr636/expr63602m* tests
When invoking interface default method via a superclass, use the direct superclass in the reference.

Reviewed-by: vromero, dlsmith, jjg
2013-11-06 17:48:25 +01:00
Jan Lahoda
513a51e9bb 8027310: Annotation Processor crashes with NPE
JCAnnotation.attribute is null when annotation type is unavailable

Reviewed-by: jjg, jfranck
2013-11-01 21:43:27 +01:00
Vicente Romero
96d9e95176 8027660: javac crash while creating LVT entry for a local variable defined in an inner block
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Reviewed-by: jjg
2013-11-01 19:08:56 +00:00
Brian Goetz
6dcdc5b742 8024930: Re-enable disabled bridging tests
Reviewed-by: psandoz, rfield
2013-10-30 14:12:16 -04:00
Vicente Romero
9d30f46219 8027327: jar files related to test test/tools/javac/ExtDirs/ExtDirTest.java should be removed from the repo
Reviewed-by: ksrini
2013-10-30 18:09:49 +00:00
Robert Field
e49bc26ebc 8027220: DefaultMethodsTest: Change test to match spec
Reviewed-by: ksrini
2013-10-24 16:52:27 -07:00
Eric McCorkle
e62fb20a59 8023682: Incorrect attributes emitted for anonymous class declaration
Cause javac to emit type annotations on new instruction as well as anonymous class supertype for annotated anonymous classes.

Reviewed-by: jjg, jfranck
2013-10-24 01:27:10 -04:00
Eric McCorkle
fb5a684124 8006732: support correct bytecode storage of type annotations in multicatch
Fix issue with annotations being added before attribution, which causes multicatch not to work right and several tests to fail.

Reviewed-by: jfranck, jjg
2013-10-23 23:20:32 -04:00
Jan Lahoda
14fe29f845 8026861: Wrong LineNumberTable for variable declarations in lambdas
Setting or correcting positions for many trees produced by LambdaToMethod.

Reviewed-by: vromero, rfield
2013-10-23 07:50:04 +02:00
Jan Lahoda
237d1940c6 8027191: Fix for JDK-8026861 refers to an incorrect bug number
Reverting changeset e7c8a164d7bd, so that it can be applied again with a correct bug number

Reviewed-by: jjg
2013-10-23 23:02:17 +02:00
Robert Field
c9ceea7ac7 8022720: Method refeerences - private method should be accessible (nested classes)
Reviewed-by: jjg, ksrini
2013-10-23 10:28:10 -07:00
Jan Lahoda
5ea357c66e 8026508: Invokedynamic instructions don't get line number table entries
Setting or correcting positions for many trees produced by LambdaToMethod.

Reviewed-by: vromero, rfield
2013-10-23 07:50:04 +02:00
Robert Field
69709943c3 8023668: Desugar serializable lambda bodies using more robust naming scheme
Lambda / bridged method-reference naming overhaul

Reviewed-by: ksrini, briangoetz
2013-10-22 16:53:21 -07:00
Vicente Romero
48b6b38e52 8025290: javac implicit versus explicit lambda compilation error
Reviewed-by: jjg, dlsmith
2013-10-22 13:54:49 +01:00
Joel Borggrén-Franck
d8d3ea2057 8026857: AnnoConstruct.getAnnotationsByType does not search supertype for inherited annotations if @SomeContainer({}) is present
An empty container should not stop javac from looking at supertypes for inherited repeating annotations

Reviewed-by: jjg
2013-10-22 10:08:49 +02:00
Joel Borggrén-Franck
4a79e1cec8 8026855: AnnoConstruct.getAnnotationsByType includes inherited indirectly present annotations even when containee type is not inheritable
In AnnoConstruct.getAnnotationByType() check that the annotation sought after is inherited before looking on supertypes.

Reviewed-by: jjg
2013-10-22 03:36:44 +02:00
Vicente Romero
43754fccbd 8026956: test tools/javac/lambda/TargetType58.java is failing after a libs change
Reviewed-by: jfranck
2013-10-21 15:55:02 +01:00
Kumar Srinivasan
24394acaea 8026931: MethodParameters tests failing on Windows
Reviewed-by: jjg, vromero
2013-10-20 12:54:17 -07:00
Werner Dietl
29582c0ec0 8026791: wrong type_path encoded for method_return on an inner class constructor
Reviewed-by: jjg
2013-10-20 12:46:12 -07:00
Vicente Romero
027b935c1b 8024809: javac, some lambda programs are rejected by flow analysis
Reviewed-by: jjg, dlsmith
2013-10-19 17:43:09 +01:00
Jonathan Gibbons
cf30c20337 8026749: Missing LV table in lambda bodies
Reviewed-by: vromero, jlahoda
2013-10-18 15:03:34 -07:00
Matherey Nunez
c57660ca19 8008192: Better ordering checks needed in repeatingAnnotations/combo/ReflectionTest
Reviewed-by: jjg, jfranck
2013-10-17 13:50:00 +02:00
Matherey Nunez
7c6e4696ab 8015372: Update tests for Method Parameter Reflection API to check whether a parameter is final
Reviewed-by: jjg, jfranck
2013-10-17 13:27:36 +02:00
Eric McCorkle
b8aff04aa0 8026286: Improper locking of annotation queues causes assertion failures
8026063: Calls to annotate.flush() cause incorrect type annotations to be generated

Fix locking in ClassReader.java

Reviewed-by: jfranck
2013-10-16 16:33:04 -04:00
Jonathan Gibbons
ef68cc1fc1 8026704: Build failure with --enable-debug
Reviewed-by: ksrini
2013-10-16 10:47:21 -07:00
Werner Dietl
e5c34a89eb 8026564: import changes from type-annotations forest
Co-authored-by: Steve Sides <steve.sides@oracle.com>
Reviewed-by: jjg
2013-10-15 15:57:13 -07:00
Vicente Romero
1868655b89 8024947: javac should issue the potentially ambiguous overload warning only where the problem appears
Reviewed-by: jjg
2013-10-15 21:02:21 +01:00
Vicente Romero
53cc43916a 8025816: javac crash with method reference with a type variable as the site
Reviewed-by: jjg
2013-10-15 19:36:45 +01:00
Jan Lahoda
52d83865b8 8026180: com.sun.source.tree.NewArrayTree refers to com.sun.tools.javac.util.List
Correcting import in NewArrayTree, adding test protecting againts improper types in API signatures

Reviewed-by: jjg
2013-10-15 16:23:18 +02:00
Jonathan Gibbons
0837163643 8025998: Missing LV table in lambda bodies
Reviewed-by: vromero
2013-10-14 23:07:43 -07:00
Jan Lahoda
da21af58f4 8014016: javac is too late detecting invalid annotation usage
Adding new queue to Annotate for validation tasks, performing annotation validation during enter

Reviewed-by: jjg, emc, jfranck
2013-10-14 22:11:09 +02:00
Jan Lahoda
958096d69b 6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
Reviewed-by: darcy, jfranck, jjg
2013-10-11 15:49:15 +02:00
Robert Field
a8e63b82f1 8012557: Implement lambda methods on interfaces as private
8016320: Method reference in subinterface of type I.super::foo produces exception at runtime

Now that the VM supports interface instance private methods, lambda methods and lambda bridges are always private. Access is now through invokespecial.

Reviewed-by: vromero, jlahoda
2013-10-10 23:26:56 -07:00
Eric McCorkle
a78344ba67 8008762: Type annotation on inner class in anonymous class show up as regular type annotations
8015257: type annotation with TYPE_USE and FIELD attributed differently if repeated
8013409: test failures for type annotations

Fixes to address some problems in type annotations

Reviewed-by: jfranck, jjg
2013-10-10 20:12:08 -04:00
Eric McCorkle
ad8c918fb1 8019461: Clean up javac diagnostics
7196553: Review error messages for repeating annotations

Changes to the diagnostic messages to improve clarity and JLS coherence

Reviewed-by: jjg
2013-10-10 13:55:41 -04:00
Jan Lahoda
5ec0ba7c47 8025087: Annotation processing api returns default modifier for interface static method
ClassReader must not set Flags.DEFAULT for interface static methods

Reviewed-by: vromero, jjg
2013-10-09 13:09:31 +02:00
Jan Lahoda
7de3ec870d 8025141: java.lang.ClassFormatError: Illegal field modifiers in class (...)
Should not generate non-public $assertionsDisabled field into interfaces

Reviewed-by: jjg, vromero
2013-10-09 13:06:49 +02:00
Andreas Lundblad
f6875dad27 8024415: Bug in javac Pretty: Wrong precedence in JCConditional trees
Fixed precedence and associativity issues with pretty printing of JCConditional expressions.

Co-authored-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: jfranck
2013-10-08 15:33:28 +02:00
Steve Sides
03c9c56f88 8005542: jtreg test OverrideBridge.java contains @ignore
Reviewed-by: jjg
2013-10-04 16:23:05 -07:00
Jonathan Gibbons
be225c4b49 8022163: javac exits with 0 status and no messages on error to construct an ann-procesor
Reviewed-by: darcy
2013-10-04 13:59:13 -07:00
Jan Lahoda
dd031ed38f 8025118: Annotation processing api returns default modifier for interface without default methods
TypeElement.getModifiers() should not contain Modifier.DEFAULT

Reviewed-by: darcy, jjg
2013-10-04 08:29:54 +02:00
Vicente Romero
696179bbda 8023679: Improve error message for '_' used as a lambda parameter name
Reviewed-by: jjg, dlsmith
2013-10-02 17:04:51 +01:00
Eric McCorkle
d9502c856a 8021339: Compile-time error during casting array to intersection
Add ability to have arrays in intersection types.

Reviewed-by: jjg, vromero
2013-10-01 17:41:57 -04:00
Eric McCorkle
d03ac9784a 8025413: NPE in Type.java due to recent change
IsCompound throws a NPE for noType and other types.  Made it return a reasonable result instead.

Reviewed-by: jjg, vromero
2013-09-28 13:46:14 -04:00
Kumar Srinivasan
b43acfee98 8015073: c.s.t.javac.api.JavacTool.getTask() - more informative exception
Reviewed-by: jjg
2013-09-27 16:05:56 -07:00
Robert Field
9a6f8e8463 8025548: langtools test tools/javac/lambda/methodReference/BridgeMethod.java incorrectly assumes no other methods generated in lambda class
Reviewed-by: vromero
2013-09-27 13:06:38 -07:00
Sonali Goel
475b209cf7 8025537: Convert 2 javac/enumdeclarations tests in jtreg for regression ws
Reviewed-by: jjg
2013-09-27 10:39:52 -07:00
Jan Lahoda
6c9b134b12 8022765: Compiler crashes with exception on wrong usage of an annotation
Error recovery for incorrect annotation attribute values - ensure the values are always attributed appropriately

Reviewed-by: jfranck, jjg
2013-09-27 17:28:31 +02:00
Vicente Romero
cae732b133 8024497: crash returning this-referencing lambda from default method
Reviewed-by: jjg, rfield
2013-09-27 10:24:56 +01:00
Sonali Goel
e60e01be01 8011738: Write test to check for bootstrap attributes for lambda expressions in class file
Reviewed-by: mcimadamore
2013-09-26 15:04:15 -07:00
Eric McCorkle
c101eca6bb 6499673: Assertion check for TypeVariable.getUpperBound() fails
Fix TypeVariable.getUpperBound to return results as specified

Reviewed-by: jjg
2013-09-23 15:37:59 -04:00
Alexander Zuev
e815841576 4881267: improve diagnostic for "instanceof T" for type parameter T
Reviewed-by: vromero, jjg
2013-09-23 18:29:27 +04:00
Alexander Zuev
eacd2bcb72 7154966: CRs found to be in Fixed state with no test and no noreg- keyword
Reviewed-by: ksrini
2013-09-23 17:27:38 +04:00
Andreas Lundblad
48774216f2 6386236: Please rename com.sun.tools.javac.util.ListBuffer.lb()
Static factory method ListBuffer.lb removed. Replaced by constructor calls.

Reviewed-by: jfranck, jjg
2013-09-23 10:42:38 +02:00
Andreas Lundblad
a2a38c6b65 8024988: javac, LVT test harness should generate tests .class files in the scratch folder
Set the CLASS_OUTPUT location to the scratch directory. Changed the argument to checkClassFile accordingly.

Reviewed-by: jjg, vromero
2013-09-23 10:10:07 +02:00
Vicente Romero
70e873ec73 8024696: Missing null check in bound method reference capture
Reviewed-by: jjg, briangoetz
2013-09-22 12:53:03 +01:00
Jan Lahoda
9f6d1df747 8023835: TreeMaker.QualIdent() too leafy
Reviewed-by: jjg
2013-09-20 16:33:35 +02:00
Vicente Romero
e3d450e3d3 8024437: Inferring the exception thrown: sometimes fails to compile
Reviewed-by: jjg
2013-09-19 20:57:37 +01:00
Jan Lahoda
1c9e7a8edc 8022567: Javac Should Generate Warnings For Raw Array Type
Reviewed-by: jjg
2013-09-19 17:05:08 +02:00
Andreas Lundblad
775822bed7 8024127: javac, Code_attribute.exception_table_langth should be Code_attribute.exception_table_length
Exception_table_langth renamed to exception_table_length

Reviewed-by: jfranck, jjg
2013-09-18 14:39:27 +02:00
Jonathan Gibbons
7cc012b008 8024538: -Xdoclint + -Xprefer:source + incremental compilation == FAIL
Reviewed-by: darcy
2013-09-17 14:17:13 -07:00
Jan Lahoda
315696de00 8021112: Spurious unchecked warning reported by javac
6480588: No way to suppress deprecation warnings when implementing deprecated interface

Fixing DeferredLintHandler configuration, so lint warnings are reported with correct @SuppressWarnings settings

Reviewed-by: jjg, vromero
2013-09-16 14:13:44 +02:00
Vicente Romero
86baa378e4 7047734: javac, the LVT is not generated correctly in several scenarios
Reviewed-by: jjg, mcimadamore
2013-09-14 19:04:47 +01:00
Vicente Romero
0a312ba2ce 8024207: javac crash in Flow.AssignAnalyzer.visitIdent
Reviewed-by: jjg
2013-09-14 15:23:21 +01:00
Vicente Romero
204f4422ba 8023558: Javac creates invalid bootstrap methods for complex lambda/methodref case
Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Reviewed-by: jjg
2013-09-12 22:40:29 +01:00
Eric McCorkle
914b1751c4 8013846: javac fails to reject semantically equivalent generic method declarations
Cause javac to consider intersection types with the same elements to be equal regardless of order.

Reviewed-by: jjg, vromero
2013-09-12 14:52:28 -04:00
Andreas Lundblad
fae7d60062 8005222: Fixed bugs should have tests with bugid in @bug tag
Reviewed-by: jfranck, jjg
2013-09-10 13:47:51 +02:00
Jan Lahoda
a9e5e17bd2 8019521: Enhanced rethrow disabled in lambdas
Fixing effectively final detection inside lambdas, small cleanup related to thrown types detection in lambdas

Reviewed-by: mcimadamore, jjg
2013-09-09 23:13:45 +02:00
Jonathan Gibbons
810c76f567 8006972: jtreg test fails: test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java
Reviewed-by: darcy
2013-09-09 17:36:23 -07:00
Brian Goetz
b03e5fc290 8015322: Javac template test framework
Putback of the javac template test framework from the Lambda repository

Reviewed-by: jjg
2013-09-09 17:11:55 -04:00
Eric McCorkle
5b76a0d216 8022322: Reject default and static methods in annotation
Causes javac to reject static and default method declarations inside an annotation

Reviewed-by: jjg
2013-09-09 16:26:55 -04:00
Vicente Romero
1704a9454c 8024154: Fix for 8016177: structural most specific and stuckness breaks 6 langtools tests
Reviewed-by: jjg, jfranck
2013-09-09 16:32:08 +01:00
Andreas Lundblad
5df75e001d 8022260: Rename javac.code.Annotations to javac.code.SymbolMetadata
Reviewed-by: jfranck, jjg
2013-09-09 09:58:20 +02:00
Vicente Romero
a3b1359af5 8024398: javac, compiler crashes with try with empty body
Reviewed-by: jjg
2013-09-08 11:54:21 +01:00
Vicente Romero
26758f0ffd 8024039: javac, previous solution for JDK-8022186 was incorrect
Reviewed-by: jjg
2013-09-06 09:53:24 +01:00
Maurizio Cimadamore
4cc7a55aab 8023549: Compiler emitting spurious errors when constructor reference type is inferred and explicit type arguments are supplied
Reviewed-by: jjg, vromero
2013-09-04 00:01:05 +01:00
Vicente Romero
cab6b226ff 8023545: Misleading error message when using diamond operator with private constructor
Reviewed-by: jjg
2013-09-03 23:41:37 +01:00
Maurizio Cimadamore
06caeea3d6 8023389: Javac fails to infer type for lambda used with intersection type and wildcards
Reviewed-by: jjg, vromero
2013-09-03 23:31:33 +01:00
Vicente Romero
46d7a993ad 8022162: Incorrect signature determination for certain inner class generics
Reviewed-by: jjg
2013-09-02 22:44:06 +01:00
Maurizio Cimadamore
0382c78ff1 8016177: structural most specific and stuckness
Reviewed-by: jjg, vromero
2013-09-02 22:38:36 +01:00
Jonathan Gibbons
3dd18b5d8c 8024093: Two *.rej files checked in to langtools/test directory
Reviewed-by: mchung
2013-08-30 15:14:51 -07:00
Jonathan Gibbons
445a49ecb6 8023522: tools/javac/tree/TypeAnnotationsPretty.java test cases with @TA newline fail on windows only
Reviewed-by: darcy
2013-08-29 11:57:52 -07:00
Henry Jen
8873ff4e48 8014566: Remove @ignore tags from MethodReference66 and InInterface when 8013875 is fixed
Reviewed-by: briangoetz, jjg
2013-08-28 10:17:23 -07:00
Werner Dietl
d99f710f70 8023768: Use the unannotatedType in cyclicity checks
Reviewed-by: jjg
2013-08-26 15:55:46 -07:00
Eric McCorkle
0d3a9fcd89 8020745: Suspicious MethodParameters attribute generated for local classes capturing local variables
Corrected an error in a previous patch that caused captured locals to be added to the beginning, not the end of a parameter list.

Reviewed-by: jjg, mcimadamore, ksrini, abuckley
2013-08-22 12:47:46 -04:00
Vicente Romero
c65abc95df 8023112: javac should not use lazy constant evaluation approach for method references
Reviewed-by: jjg, mcimadamore
2013-08-22 13:12:43 +01:00
Vicente Romero
7b989a82fd 8022316: Generic throws, overriding and method reference
Reviewed-by: jjg, mcimadamore
2013-08-22 10:22:44 +01:00
Eric McCorkle
febfa82cfb 8023520: Add missing test for JDK-7118412
The test for JDK-7118412 was dropped from the changeset in a merging accident.

Reviewed-by: jjg
2013-08-21 20:41:42 -04:00
Jonathan Gibbons
64412dad17 8022287: javac.sym.Profiles uses a static Map when it should not
Reviewed-by: ksrini
2013-08-21 17:26:22 -07:00
Werner Dietl
1dc32a077e 8023515: import type-annotations updates
Reviewed-by: jjg
2013-08-21 16:13:50 -07:00
Kumar Srinivasan
c9f3cedbfa 7179455: tools/javac/processing/model/testgetallmembers/Main.java fails against JDK 7 and JDK 8
Reviewed-by: jjg
2013-08-20 14:15:45 -07:00
Joe Darcy
557cb9c6b1 8011043: Warn about use of 1.5 and earlier source and target values
Reviewed-by: jjg
2013-08-20 12:15:19 -07:00
Joel Borggrén-Franck
07d44a6520 8019243: AnnotationTypeMismatchException instead of MirroredTypeException
Reviewed-by: jjg
2013-08-20 17:21:47 +02:00
Alexander Zuev
7947e49ae3 7182350: Regression in wording of unchecked warning message
Reviewed-by: mcimadamore, jjg
2013-08-20 17:34:06 +04:00
Kumar Srinivasan
7870f1a6dc 7071377: Exception when javac -processor is given a class name with invalid postfix
Reviewed-by: jjg, vromero
2013-08-19 07:47:10 -07:00
Jan Lahoda
d992a67102 8022508: javac crashes if the generics arity of a base class is wrong
Reviewed-by: mcimadamore, vromero
2013-08-15 22:36:08 +02:00
Jan Lahoda
59e0637339 8015809: More user friendly compile-time errors for uncaught exceptions in lambda expression
Producing individual errors for uncaught undeclared exceptions inside lambda expressions, rather than one error for the whole lambda

Reviewed-by: mcimadamore
2013-08-15 22:33:43 +02:00
Vicente Romero
746be81338 8022053: javac generates unverifiable initializer for nested subclass of local class
Reviewed-by: jjg, mcimadamore
2013-08-16 10:32:42 +01:00
Kumar Srinivasan
ce4eb93249 8007517: DefaultMethodRegressionTests.java fail in TL
Reviewed-by: jjg, vromero
2013-08-14 07:07:55 -07:00
Vicente Romero
d36ef0edd0 8013394: compile of iterator use fails with error \"defined in an inaccessible class or interface\"
Reviewed-by: mcimadamore
2013-08-14 10:53:37 +01:00
Maurizio Cimadamore
58d92c516a 8021567: Javac doesn't report \"java: reference to method is ambiguous\" any more
Javac incorrectly forgets about constant folding results within lambdas

Reviewed-by: jjg, vromero
2013-08-12 17:28:31 +01:00
Maurizio Cimadamore
4e85a5ae43 6537020: JCK tests: a compile-time error should be given in case of ambiguously imported fields (types, methods)
Hiding check does not support interface multiple inheritance

Reviewed-by: jjg
2013-08-12 17:25:07 +01:00
Vicente Romero
190f9337b1 6983297: methods missing from NewArrayTree
Reviewed-by: jjg
2013-08-10 16:29:26 +01:00
Vicente Romero
22652f5354 8022622: javac, two tests are failing with compile time error after class Collector was modified
Reviewed-by: mcimadamore
2013-08-10 16:26:50 +01:00
Vicente Romero
cee3c2853b 8009640: -profile <compact> does not work when -bootclasspath specified
Reviewed-by: jjg
2013-08-10 13:27:38 +01:00
Kumar Srinivasan
35e27fd594 8022161: javac Null Pointer Exception in Enter.visitTopLevel
Reviewed-by: jjg, vromero, jlahoda
2013-08-09 15:01:33 -07:00
Vicente Romero
cecb5cc0ea 8019486: javac, generates erroneous LVT for a test case with lambda code
Reviewed-by: mcimadamore
2013-08-08 11:49:16 +01:00
Vicente Romero
0fb4cd9d38 8020997: TreeMaker.AnnotationBuilder creates broken element literals with repeating annotations
Reviewed-by: jjg, jfranck
2013-08-07 10:41:20 +01:00
Joel Borggrén-Franck
70ac5c3a48 8009367: Wrong kind of name used in comparison in javax.lang.model code for repeatable annotations
Reviewed-by: jjg, darcy
2013-08-07 01:32:39 +02:00
Vicente Romero
5f5b303d7e 8022186: javac generates dead code if a try with an empty body has a finalizer
Reviewed-by: jjg
2013-08-06 15:08:49 +01:00
Kumar Srinivasan
da7f38703d 8014826: c.s.t.javac.tree.Pretty.visitNewArray() prints duplicate dimension markers
Reviewed-by: jjg, vromero
2013-07-31 08:37:34 -07:00
Vicente Romero
5540c7cbe1 8013179: assertion failure in javac when compiling with -source 1.6 -target 1.6
Reviewed-by: jjg
2013-07-31 10:52:01 +01:00
Jan Lahoda
0847cbc403 8021338: Diamond finder may mark a required type argument as unnecessary
Reviewed-by: mcimadamore
2013-07-28 10:17:45 +02:00
Jan Lahoda
21ab6d5558 8020689: Missing LineNumberTable entries in compiled class files
Reviewed-by: ksrini, mcimadamore
2013-07-28 10:17:45 +02:00
Lana Steuck
f5da332e66 Merge 2013-07-26 14:08:37 -07:00
Maurizio Cimadamore
da6bbaf42b 8020843: javac crashes on accessibility check with method reference with typevar receiver
Method reference overload check doesn't walk through type-variable receivers

Reviewed-by: jjg
2013-07-25 14:51:40 +01:00
Maurizio Cimadamore
663170c654 8016081: field initialized with lambda in annotation types doesn't compile
Check for annotation attributes should skip over synthetic methods

Reviewed-by: jjg
2013-07-25 14:49:16 +01:00
Maurizio Cimadamore
67362236e8 8020804: javac crashes when speculative attribution infers intersection type with array component
Assertion is causing javac to crash because of lack of support for arrays in intersection types

Reviewed-by: jjg
2013-07-25 14:47:43 +01:00
Joel Borggrén-Franck
2030148ec2 8007961: javax.lang.model tests for repeating annotations fail in getAnnotationsByType
Reviewed-by: jjg
2013-07-25 11:02:27 +02:00
Eric McCorkle
be2ea6f949 8016880: 42 tests in annot102* fail with compile-time errors
Fixes error in type equality when bounds of type variables have annotations.

Reviewed-by: jjg, mcimadamore
2013-07-23 20:42:54 -04:00
Lana Steuck
524a340ac9 Merge 2013-07-22 17:39:45 -07:00
Kumar Srinivasan
c6c6fe7b5e 8017216: javac doesn't fill in end position for some errors of type not found
8019421: Javac doesn't fill in end position for some annotation related errors
8019422: Javac doesn't fill in end position for uninitialized variable errors

Reviewed-by: jjg, mcimadamore
2013-07-19 07:22:53 -07:00
Maurizio Cimadamore
70e005a7eb 8013638: Few policy tests are failing in Lambda nightly
BridgeHarness test is leaving files open

Reviewed-by: ksrini
2013-07-17 19:28:40 +01:00
Lana Steuck
be00b8110f Merge 2013-07-17 10:40:53 -07:00
Jan Lahoda
35af8eccde 8020586: Warning produced for an incorrect file
Always using DeferredLintHandler.immediateHandler when processing import classes

Reviewed-by: mcimadamore
2013-07-17 15:08:58 +02:00
Maurizio Cimadamore
a2a579a4bd 8019942: Graph inference: avoid redundant computation during bound incorporation
Bound incorporation should not perform same operation multiple times

Reviewed-by: jjg
2013-07-17 14:21:12 +01:00
Maurizio Cimadamore
717a989214 8019340: varargs-related warnings are meaningless on signature-polymorphic methods such as MethodHandle.invokeExact
Disable certain varargs warnings when compiling polymorphic signature calls

Reviewed-by: jjg
2013-07-17 14:19:25 +01:00
Maurizio Cimadamore
73953320cc 8020149: Graph inference: wrong logic for picking best variable to solve
Replace logic for selecting best inference leaf in the graph during an unsticking round

Reviewed-by: jjg
2013-07-17 14:19:02 +01:00
Maurizio Cimadamore
8850329bc1 8016640: compiler hangs if the generics arity of a base class is wrong
Check.checkCompatibleConcretes hang when javac creates synthetic supertypes for 269 model API

Reviewed-by: jjg
2013-07-17 14:16:25 +01:00
Maurizio Cimadamore
defbb67771 7041019: Bogus type-variable substitution with array types with dependencies on accessibility check
Call to upperBound() when performing type-variable substitution on element type leads to unsoundness

Reviewed-by: jjg
2013-07-17 14:14:49 +01:00
Maurizio Cimadamore
732e49f6dc 8020286: Wrong diagnostic after compaction
Compact diagnostic shows the least relevant method in the list

Reviewed-by: jjg
2013-07-17 14:14:32 +01:00
Maurizio Cimadamore
eb4e8153b3 8020147: Spurious errors when compiling nested stuck lambdas
Scope of deferred types is not copied correctly; postAttr analyzer should not run on stuck expressions

Reviewed-by: jjg
2013-07-17 14:13:15 +01:00
Maurizio Cimadamore
e92a56fade 8012238: Nested method capture and inference
8008200: java/lang/Class/asSubclass/BasicUnit.java fails to compile

Inference support should be more flexible w.r.t. nested method calls returning captured types

Reviewed-by: jjg, vromero
2013-07-17 14:11:41 +01:00
Maurizio Cimadamore
99b0413d48 8016175: Add bottom-up type-checking support for unambiguous method references
Type-checking of non-overloaded method references should be independent from target-type

Reviewed-by: jjg, vromero
2013-07-17 14:09:46 +01:00
Maurizio Cimadamore
941752ea25 8012242: Lambda compatibility and checked exceptions
Inference variables in 'throws' clause with no constraints should be inferred as RuntimeException

Reviewed-by: jjg, vromero
2013-07-17 14:04:01 +01:00
Maurizio Cimadamore
617386d568 8013404: Unclear spec for target typing with conditional operator (?:)
Fix previously ignored test

Reviewed-by: jjg, vromero
2013-07-11 15:37:02 +01:00
Robert Field
d3d1da337a 8016281: The SAM method should be passed to the metafactory as a MethodType not a MethodHandle
8020010: Move lambda bridge creation from metafactory and VM to compiler

Langtools/javac component of the bridge support and MethodType vs. MethodHandle changes.

Reviewed-by: jjg, vromero, briangoetz, forax
2013-07-11 14:07:39 +01:00
Maurizio Cimadamore
7229f89614 8019824: very long error messages on inference error
Inference error messages shows several spurious captured variables generated during an inference loop

Reviewed-by: jjg, vromero
2013-07-05 11:05:02 +01:00
Maurizio Cimadamore
4442f43ea3 8016702: use of ternary operator in lambda expression gives incorrect results
Constant types erroneously creep in during inference

Reviewed-by: jjg, vromero
2013-07-05 11:04:22 +01:00
Maurizio Cimadamore
28b5759093 8016059: Cannot compile following lambda
8016060: Lambda isn't compiled with return statement

Spurious error triggered during unnecessary recovery round

Reviewed-by: jjg, vromero
2013-07-05 11:03:04 +01:00
Maurizio Cimadamore
86f630b63e 8019480: Javac crashes when method is called on a type-variable receiver from lambda expression
Logic for shortcircuiting speculative attribution doesn't handle type-variable receivers

Reviewed-by: jjg, vromero
2013-07-05 11:02:17 +01:00
Maurizio Cimadamore
7e6f7dcca5 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
RDF crashes when diagnostic contains type 'void'

Reviewed-by: jjg, vromero
2013-07-05 11:00:19 +01:00
Vicente Romero
684d5ec76d 6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
Reviewed-by: mcimadamore
2013-07-04 10:41:08 +01:00
Vicente Romero
ea2c99f5bb 6326693: variable x might already have been assigned, when assignment is in catch block
Reviewed-by: mcimadamore
2013-07-02 22:49:40 +01:00
Kumar Srinivasan
bab861035d 8019460: tests in changeset do not have @bug tag
Reviewed-by: darcy
2013-07-01 16:36:08 -07:00
Joe Darcy
547a050fe1 7162089: Add support for repeating annotations to javax.annotation.processing
Reviewed-by: abuckley, jjg, jfranck
2013-07-01 11:58:45 -07:00
Maurizio Cimadamore
1c13f5e4cb 7034798: Ambiguity error for abstract method call is too eager
Javac should wait and see if ambiguous methods can be reconciled at the end of an overload resolution round

Reviewed-by: jjg, vromero
2013-07-01 14:57:03 +01:00
Lana Steuck
c5e36903f7 Merge 2013-06-28 19:47:54 -07:00
Eric McCorkle
95e39e6039 8016760: Failure of regression test langtools/tools/javac/T6725036.java
Marking the failing test @ignore; the proposed change for 8015666 addresses the underlying issue

Reviewed-by: jjg
2013-06-28 06:54:58 -04:00
Eric McCorkle
9b1ec513d5 8013357: javac accepts erroneous binary comparison operations
Javac does not report type errors on illegal Object == primitive comparisons

Reviewed-by: abuckley, mcimadamore
2013-06-27 17:45:56 -04:00
Vicente Romero
a87b5d942d 7008643: inlined finally clauses confuse debuggers
Reviewed-by: jjg
2013-06-27 16:06:56 +01:00
Vicente Romero
4e49cb5fc5 8016099: Some @SuppressWarnings annotations ignored ( unchecked, rawtypes )
Reviewed-by: jjg
2013-06-27 16:04:05 +01:00