Bug 573261 - OpenJDK javac can't build IDEA
OpenJDK javac can't build IDEA
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Deepak Bhole
Fedora Extras Quality Assurance
F13FeatureIDEA
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-13 15:09 EST by Lubomir Rintel
Modified: 2010-03-14 10:21 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-14 10:21:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
6638712: Inference with wildcard types causes selection of inapplicable method (29.27 KB, patch)
2010-03-13 15:09 EST, Lubomir Rintel
no flags Details | Diff
6650759: Inference of formal type parameter (unused in formal parameters) is not performed (35.17 KB, patch)
2010-03-13 15:10 EST, Lubomir Rintel
no flags Details | Diff
6638712: Inference with wildcard types causes selection of inapplicable method (31.37 KB, patch)
2010-03-13 18:14 EST, Lubomir Rintel
no flags Details | Diff
6638712: Inference with widcard types causes selection of inapplicable method (29.22 KB, patch)
2010-03-13 18:18 EST, Lubomir Rintel
no flags Details | Diff
399889: 6650759: Inference of formal type parameter (unused in formal parameters) is not performed (35.17 KB, patch)
2010-03-13 18:19 EST, Lubomir Rintel
no flags Details | Diff

  None (edit)
Description Lubomir Rintel 2010-03-13 15:09:17 EST
Created attachment 399888 [details]
6638712: Inference with wildcard types causes selection of inapplicable method

Description of problem:

Compilation of IntelliJ IDEA Community Edition with OpenJDK 6 terminates with an error message (see below). Compilation with OpenJDK 7 tip and Sun JDK 6 works fine though.

I could not authorize to checkout Sun JDK 6 to see how is it different, but managed to isolated fixed from JDK 7. Attaching the patches.  

Steps to Reproduce:

A small reproducer with binaries of dependencies is provided here for convenience: http://v3.sk/~lkundrak/idea-openjdk/
  
Actual results:

     [java]     [javac] /home/lkundrak/src/idea/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java:223: forEach(com.intellij.util.Processor<com.intellij.psi.PsiClass>) in com.intellij.util.Query<com.intellij.psi.PsiClass> cannot be applied to (com.intellij.psi.search.PsiElementProcessorAdapter<com.intellij.psi.PsiMember>)
     [java]     [javac]           .forEach(createMembersProcessor(processors, scope));
     [java]     [javac]           ^
     [java]     [javac] /home/lkundrak/src/idea/java/java-impl/src/com/intellij/codeInspection/ex/GlobalJavaInspectionContextImpl.java:240: forEach(com.intellij.util.Processor<com.intellij.psi.PsiMethod>) in com.intellij.util.Query<com.intellij.psi.PsiMethod> cannot be applied to (com.intellij.psi.search.PsiElementProcessorAdapter<com.intellij.psi.PsiMember>)
     [java]     [javac]           .forEach(createMembersProcessor(processors, scope));
     [java]     [javac]           ^

Expected results:


Additional info:

Attaching the backported fixes from OpenJDK 7.
I'm currently running jtreg to test the changes, I'll post the results here once if finishes.
Comment 1 Lubomir Rintel 2010-03-13 15:10:18 EST
Created attachment 399889 [details]
6650759: Inference of formal type parameter (unused in formal parameters) is not performed

Apply this on top of the first changeset.
Comment 2 Lubomir Rintel 2010-03-13 18:14:35 EST
Created attachment 399919 [details]
6638712: Inference with wildcard types causes selection of inapplicable method
Comment 3 Lubomir Rintel 2010-03-13 18:18:18 EST
Created attachment 399920 [details]
6638712: Inference with widcard types causes selection of inapplicable method
Comment 4 Lubomir Rintel 2010-03-13 18:19:31 EST
Created attachment 399921 [details]
399889: 6650759: Inference of formal type parameter (unused in formal parameters) is not performed

Fixed up regression tests.
Comment 5 Lubomir Rintel 2010-03-14 10:20:16 EDT
Please ignore this. With these patches applied (as well as with JDK7), CollectUtil can not be compiled. I'm going to report this upstream instead.
Comment 6 Lubomir Rintel 2010-03-14 10:21:15 EDT
Closing this, will compile those classes with GCJ for now.

Note You need to log in before you can comment on or make changes to this bug.