Lines 270-275
Link Here
|
270 |
scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd, modifiers); |
270 |
scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd, modifiers); |
271 |
} |
271 |
} |
272 |
} |
272 |
} |
|
|
273 |
|
274 |
// Verify that there's no type variable reference |
275 |
// (javadoc does not accept them and this is not a referenced bug or requested enhancement) |
276 |
if (reference.resolvedType != null && reference.resolvedType.isTypeVariable()) { |
277 |
scope.problemReporter().javadocInvalidReference(reference.sourceStart, reference.sourceEnd); |
278 |
} |
273 |
} |
279 |
} |
274 |
|
280 |
|
275 |
/* |
281 |
/* |
Lines 402-415
Link Here
|
402 |
if (paramBindind.isTypeVariable()) { |
408 |
if (paramBindind.isTypeVariable()) { |
403 |
// Verify duplicated tags |
409 |
// Verify duplicated tags |
404 |
boolean duplicate = false; |
410 |
boolean duplicate = false; |
405 |
for (int j = 0; j < maxBindings && !duplicate; j++) { |
411 |
for (int j = 0; j < i && !duplicate; j++) { |
406 |
if (bindings[j] == param.resolvedType) { |
412 |
if (bindings[j] == param.resolvedType) { |
407 |
scope.problemReporter().javadocDuplicatedParamTag(param.token, param.sourceStart, param.sourceEnd, modifiers); |
413 |
scope.problemReporter().javadocDuplicatedParamTag(param.token, param.sourceStart, param.sourceEnd, modifiers); |
408 |
duplicate = true; |
414 |
duplicate = true; |
409 |
} |
415 |
} |
410 |
} |
416 |
} |
411 |
if (!duplicate) { |
417 |
if (!duplicate) { |
412 |
bindings[maxBindings++] = (TypeVariableBinding) param.resolvedType; |
418 |
bindings[i] = (TypeVariableBinding) param.resolvedType; |
|
|
419 |
maxBindings++; |
413 |
} |
420 |
} |
414 |
} else { |
421 |
} else { |
415 |
scope.problemReporter().javadocUndeclaredParamTagName(param.token, param.sourceStart, param.sourceEnd, modifiers); |
422 |
scope.problemReporter().javadocUndeclaredParamTagName(param.token, param.sourceStart, param.sourceEnd, modifiers); |
Lines 418-436
Link Here
|
418 |
} |
425 |
} |
419 |
|
426 |
|
420 |
// Look for undocumented type parameters |
427 |
// Look for undocumented type parameters |
421 |
if (reportMissing) { |
428 |
for (int i = 0; i < typeParametersLength; i++) { |
422 |
for (int i = 0; i < typeParametersLength; i++) { |
429 |
TypeParameter parameter = parameters[i]; |
423 |
TypeParameter parameter = parameters[i]; |
430 |
boolean found = false; |
424 |
boolean found = false; |
431 |
for (int j = 0; j < paramTypeParamLength && !found; j++) { |
425 |
for (int j = 0; j < maxBindings && !found; j++) { |
432 |
if (parameter.binding == bindings[j]) { |
426 |
if (parameter.binding == bindings[j]) { |
433 |
found = true; |
427 |
found = true; |
434 |
bindings[j] = null; |
428 |
} |
|
|
429 |
} |
430 |
if (!found) { |
431 |
scope.problemReporter().javadocMissingParamTag(parameter.name, parameter.sourceStart, parameter.sourceEnd, modifiers); |
432 |
} |
435 |
} |
433 |
} |
436 |
} |
|
|
437 |
if (!found && reportMissing) { |
438 |
scope.problemReporter().javadocMissingParamTag(parameter.name, parameter.sourceStart, parameter.sourceEnd, modifiers); |
439 |
} |
440 |
} |
441 |
|
442 |
// Report invalid param |
443 |
for (int i=0; i<paramTypeParamLength; i++) { |
444 |
if (bindings[i] != null) { |
445 |
JavadocSingleTypeReference param = this.paramTypeParameters[i]; |
446 |
scope.problemReporter().javadocUndeclaredParamTagName(param.token, param.sourceStart, param.sourceEnd, modifiers); |
447 |
} |
434 |
} |
448 |
} |
435 |
} |
449 |
} |
436 |
} |
450 |
} |