Skip to content

[java] Deprecate rule CloneThrowsCloneNotSupportedException #3112

@oowekyala

Description

@oowekyala

CloneThrowsCloneNotSupportedException

From #3104

I'm not sure CloneThrowsCloneNotSupportedException is useful, as calling super.clone() already forces you to declare the exception or handle it... why does it exist?

Don't know - that's a very old rule. Object.clone() throws this checked Exception, but you don't need to declare that when you override the clone method. You might need to catch it though when calling super.clone(). Maybe a candidate for retirement?

Metadata

Metadata

Assignees

Labels

is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions