View | Details | Raw Unified | Return to bug 258906 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java (+9 lines)
Lines 378-383 Link Here
378
							break checkTargetCompatibility;
378
							break checkTargetCompatibility;
379
						} else if ((metaTagBits & TagBits.AnnotationForType) != 0)
379
						} else if ((metaTagBits & TagBits.AnnotationForType) != 0)
380
							break checkTargetCompatibility;
380
							break checkTargetCompatibility;
381
						else {
382
							// Annotations that target a package are kosher for the synthetic interface type
383
							// package-info. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258906
384
							char [] name = ((ReferenceBinding)this.recipient).sourceName();
385
							if (name != null && CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) {
386
								if ((metaTagBits & TagBits.AnnotationForPackage) != 0)
387
									break checkTargetCompatibility;
388
							}
389
						}
381
						break;
390
						break;
382
					case Binding.METHOD :
391
					case Binding.METHOD :
383
						if (((MethodBinding)this.recipient).isConstructor()) {
392
						if (((MethodBinding)this.recipient).isConstructor()) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java (+4 lines)
Lines 659-664 Link Here
659
							annotations[i].traverse(visitor, methodScope);
659
							annotations[i].traverse(visitor, methodScope);
660
						}
660
						}
661
					}
661
					}
662
					// Propagate any package level annotations to the synthetic interface that is the 
663
					// representative as well as place holder for the package level info.
664
					// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258906
665
					syntheticTypeDeclaration.annotations = annotations;
662
				}
666
				}
663
			}
667
			}
664
			if (this.currentPackage != null) {
668
			if (this.currentPackage != null) {

Return to bug 258906