All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.flex.rules.flex.S1470.html Maven / Gradle / Ivy

The newest version!

Why is this an issue?

Overriding Event.clone() is a required part of the API contract:

You are required to override the Event.clone() method in your Event subclass. The clone() method returns a cloned copy of the event object by setting the type property and any new properties in the clone. Typically, you define the clone() method to return an event instance created with the new operator.

Noncompliant code example

public class MyEvent extends Event {...}

Compliant solution

public class MyEvent extends Event
{
...
  override public function clone():Event {
    return new MyEvent(...);
  }
...
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy