JDK-5038685 : javac appears to omit throws portion of generic signature attribute
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-04-27
  • Updated: 2004-05-11
  • Resolved: 2004-05-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b51Fixed
Related Reports
Relates :  
Description
In Tiger, javac includes a new signature attribute to encode generic type information of methods and constructors.  This signature is specified to include the declared throws information in addition to the return type and parameter types.  However, javac appears to omit the throws information.  Besides providing improper information to runtime reflection, it could cause improper overridding determinations to be made.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b51 tiger-beta2
08-07-2004

EVALUATION javac does not actually omit the throws information, it simply represents it differently than currently specified. What javac does is this: If the throws information is unchanged by erasure, then it is omitted from the signature and the throws for the method is taken from the Exceptions attribute. If the throws information IS changed by erasure, then the throws information is included in the Signature attribute. This is a bit nonuniform, but it will tend to reduce the size of a signatures. Our choices are to (1) implement what is currently specified, generating the exception information twice for methods with a Signature attribute, or (2) specify what is currently implemented. I'd like to know your preferences. Having said all that, there is also a bug where javac omits the Signature attribute when it is only needed because of a type parameter appearing in the exception list. ###@###.### 2004-04-28 Our consensus is a compromise. The spec will allow omission of the data, but javac will generate it in Tiger until the reflection libraries are able to cope with its absence. ###@###.### 2004-04-28
28-04-2004