File tree 1 file changed +12
-1
lines changed
src/org/deepjava/classItems
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 26
26
import org .deepjava .config .Segment ;
27
27
import org .deepjava .host .ClassFileAdmin ;
28
28
import org .deepjava .host .Dbg ;
29
+ import org .deepjava .host .StdStreams ;
29
30
import org .deepjava .linker .FixedValueEntry ;
30
31
import org .deepjava .strings .HString ;
31
32
@@ -123,7 +124,17 @@ public Class(HString registeredCpClassName) {
123
124
* all imported classes in the constant pool are loaded as well
124
125
*/
125
126
protected void loadClass (int userReqAttributes ) {
126
- // boolean dbg = true;
127
+ { // check if this class has a similar name as an already loaded class (differing in small / capital letters only)
128
+ // this is important under Windows, as e.g. test/Test and test/TEst would load the same class file
129
+ Item item = RefType .refTypeList ;
130
+ while (item != null ) {
131
+ if (item .name .toString ().toLowerCase ().equals (name .toString ().toLowerCase ()) && !item .name .equals (name )) {
132
+ StdStreams .err .println ("class " + item .name + " loaded: loads the same class file as " + name .toString () + ", please check name of root class" );
133
+ }
134
+ item = item .next ;
135
+ }
136
+ }
137
+
127
138
if (CFR .clsDbg ) vrb .println ("load class: " + name );
128
139
if (dbg ) vrb .println (">loadClass: " + name );
129
140
if ((accAndPropFlags & (1 <<dpfClassLoaded )) == 0 ) { // if not yet loaded and not synthetic
You can’t perform that action at this time.
0 commit comments