Lines 10-15
Link Here
|
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for |
11 |
* bug 282152 - [1.5][compiler] Generics code rejected by Eclipse but accepted by javac |
11 |
* bug 282152 - [1.5][compiler] Generics code rejected by Eclipse but accepted by javac |
12 |
* bug 349326 - [1.7] new warning for missing try-with-resources |
12 |
* bug 349326 - [1.7] new warning for missing try-with-resources |
|
|
13 |
* bug 359362 - FUP of bug 349326: Resource leak on non-Closeable resource |
13 |
*******************************************************************************/ |
14 |
*******************************************************************************/ |
14 |
package org.eclipse.jdt.internal.compiler.lookup; |
15 |
package org.eclipse.jdt.internal.compiler.lookup; |
15 |
|
16 |
|
Lines 44-50
Link Here
|
44 |
this.modifiers = ClassFileConstants.AccPublic | ExtraCompilerModifiers.AccGenericSignature; // treat type var as public |
45 |
this.modifiers = ClassFileConstants.AccPublic | ExtraCompilerModifiers.AccGenericSignature; // treat type var as public |
45 |
this.tagBits |= TagBits.HasTypeVariable; |
46 |
this.tagBits |= TagBits.HasTypeVariable; |
46 |
this.environment = environment; |
47 |
this.environment = environment; |
47 |
this.typeBits = -1; |
48 |
this.typeBits = TypeIds.BitUninitialized; |
48 |
} |
49 |
} |
49 |
|
50 |
|
50 |
/** |
51 |
/** |
Lines 311-324
Link Here
|
311 |
} |
312 |
} |
312 |
|
313 |
|
313 |
public boolean hasTypeBit(int bit) { |
314 |
public boolean hasTypeBit(int bit) { |
314 |
if (this.typeBits == -1) { |
315 |
if (this.typeBits == TypeIds.BitUninitialized) { |
315 |
// initialize from bounds |
316 |
// initialize from bounds |
316 |
this.typeBits = 0; |
317 |
this.typeBits = 0; |
317 |
if (this.superclass != null) |
318 |
if (this.superclass != null && this.superclass.hasTypeBit(~TypeIds.BitUninitialized)) |
318 |
this.typeBits |= this.superclass.typeBits; |
319 |
this.typeBits |= this.superclass.typeBits; |
319 |
if (this.superInterfaces != null) |
320 |
if (this.superInterfaces != null) |
320 |
for (int i = 0, l = this.superInterfaces.length; i < l; i++) |
321 |
for (int i = 0, l = this.superInterfaces.length; i < l; i++) |
321 |
this.typeBits |= this.superInterfaces[i].typeBits; |
322 |
if (this.superInterfaces[i].hasTypeBit(~TypeIds.BitUninitialized)) |
|
|
323 |
this.typeBits |= this.superInterfaces[i].typeBits; |
322 |
} |
324 |
} |
323 |
return (this.typeBits & bit) != 0; |
325 |
return (this.typeBits & bit) != 0; |
324 |
} |
326 |
} |