Modify ↓
Ticket #237 (new defect)
Opened 8 years ago
Transport code generation failure for classes without default super constructor
| Reported by: | hauma | Owned by: | hauma |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0 |
| Component: | jpc | Version: | 1.09c |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Wrong transport code is generated, when jpc tries to retrofit a serializable class that does extend a non-serializable class, which has no default constructor.
When compiling the following example (with the -local option to prevent transport code generation for all classes (see: ticket:233)), jpc crashes with "errors in generated code":
class A {
private int x;
A(int x) {
this.x = x;
}
}
class B extends A implements java.io.Serializable {
int y;
B(int x, int y) {
super(x);
this.y = y;
}
}
In such situation, no transport code should be generated at all, because it is impossible to generate transport code for B that marshals the complete state including the private instance variable x of superclass A.
Attachments
Note: See
TracTickets for help on using
tickets.
