java/1332: gcj does not check exceptions for Object.clone()

bryce@albatross.co.nz bryce@albatross.co.nz
Wed Dec 20 12:25:00 GMT 2000


>Number:         1332
>Category:       java
>Synopsis:       gcj does not check exceptions for Object.clone()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:06 PST 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     Bryce McKinlay
>Release:        unknown-1.0
>Organization:
>Environment:
any	
>Description:
Object.clone() can throw the checked exception 
CloneNotSupportException. It is thus illegal to call clone()
without catching or throwing this exception. But gcj does
not detect this error.

class Clone
{
  Object a()
  {
    return super.clone();
  }
  
  Object b(Object obj)
  {
    return obj.clone();
  }
}
>How-To-Repeat:
compile
>Fix:

>Release-Note:
>Audit-Trail:

Formerly PR gcj/308

>Unformatted:



More information about the Gcc-prs mailing list