Bug 26784 - problem M3 sourcebuild, linux/gtk - build error
Summary: problem M3 sourcebuild, linux/gtk - build error
Status: RESOLVED DUPLICATE of bug 26841
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-20 11:24 EST by Bill Welch CLA
Modified: 2002-11-21 12:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Welch CLA 2002-11-20 11:24:32 EST
RedHat 8.0 / jdk 1.4.1

building org.eclipse.jdt.ui/jdt.jar

M2 builds fine
M3 has these 3 errors and jdt.jar is nearly empty:

[javac] [loading
/usr/local/eclipse-2.1M3/plugins/org.eclipse.jdt.core/jdtcore.jar(org/eclipse/jdt/core/search/SearchEngine.class)]
    [javac] /usr/local/eclipse-2.1M3/plugins/org.eclipse.jdt.ui/core
refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java:64:
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit
has private access in
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring
    [javac] import
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification.ClassQualificationCannotBePerformed;
    [javac]                                                                    
              ^
    [javac] /usr/local/eclipse-2.1M3/plugins/org.eclipse.jdt.ui/core
refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java:64:
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification
has private access in
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit
    [javac] import
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification.ClassQualificationCannotBePerformed;
    [javac]                                                                    
                                          ^
    [javac] /usr/local/eclipse-2.1M3/plugins/org.eclipse.jdt.ui/core
refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java:64:
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification.ClassQualificationCannotBePerformed
in
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification
is not defined in a public class or interface; cannot be accessed from outside
package
    [javac] import
org.eclipse.jdt.internal.corext.refactoring.code.InlineConstantRefactoring.InlineTargetCompilationUnit.ClassQualification.ClassQualificationCannotBePerformed;
    [javac]
Comment 1 Dirk Baeumer CLA 2002-11-21 05:20:41 EST
Any idea what can cause this problem. Since we never do source builds my 
ourselves I appreciate some help here.
Comment 2 Olivier Thomann CLA 2002-11-21 12:01:51 EST
This is a simpler test case:
[package p;

import p.X.Y.Z.W;

public class X {

	private static class Y {
	
		private static class Z {
			public static class W {
			}
		}
	}
}]

javac 1.4.1 reports:
X.java:3: p.X.Y has private access in p.X
import p.X.Y.Z.W;
           ^
X.java:3: p.X.Y.Z has private access in p.X.Y
import p.X.Y.Z.W;
             ^
X.java:3: p.X.Y.Z.W in p.X.Y.Z is not defined in a public class or interface;
cannot be accessed from outside package
import p.X.Y.Z.W;
               ^
3 errors

Eclipse compiler compiles that code without an error, but if you changed it for:
[package p;

import p.X.Y.Z;

public class X {

	private static class Y {
	
		private static class Z {
			public static class W {
			}
		}
	}
}]
We do report a problem:
----------
1. ERROR in D:\temp\X.java (at line 3)
	import p.X.Y.Z;
	       ^^^^^^^
The imported type p.X.Y.Z is not visible
----------
Compiled 13 lines in 969 ms (13.4 lines/s)
1 problem (1 error)

So I would say we should fail compiling the first test case.

Jikes fails as well with these errors:

Found 2 semantic errors compiling "D:/temp/X.java":

     3. import p.X.Y.Z.W;
               ^-----^
*** Error: The type "p/X$Y$Z" has private access and is not accessible here.


     3. import p.X.Y.Z.W;
               ^---^
*** Error: The type "p/X$Y" has private access and is not accessible here.
Comment 3 Olivier Thomann CLA 2002-11-21 12:09:14 EST
Changing the private visibility of the static members for a default visibility
would fix the javac failure.
Comment 4 Philipe Mulet CLA 2002-11-21 12:16:43 EST

*** This bug has been marked as a duplicate of 26841 ***
Comment 5 Philipe Mulet CLA 2002-11-21 12:19:06 EST
I also had entered a defect about this against JDT/UI, see bug 26865.
JDT/UI code is indeed wrong, and we did not detect it in the past.