javaee-esprit / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Generate a clone() method in model classes #693

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
External references, such as a standards document, or specification?

https://google-api-client-libraries.appspot.com/documentation/calendar/v3/java/l
atest/com/google/api/services/calendar/model/Event.html

Java environments (e.g. Java 6, Android 2.3, App Engine, or All)?

All

Please describe the feature requested.

For example:

    Event event = new Event().clone();

fails to compile with the error message "Type mismatch: cannot convert from 
GenericJson to Event".  But if you cast it to Event it compiles and runs 
without any problem:

    Event event = (Event) new Event().clone();

We should just generate the clone() method in the Event class (and every other 
model class) as follows:

  @Override
  public Event clone() {
    return (Event) super.clone();
  }

Original issue reported on code.google.com by yan...@google.com on 20 Dec 2012 at 11:26

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 20 Dec 2012 at 11:26

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 12 Jan 2013 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 16 Jan 2013 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 17 Jan 2013 at 9:38