I have refactored the following object initialization:
Req r = new Req();
r.set_f1("A");
r.set_f2(123);
r.set_f3(123.456);
Into:
Req r = new Req() {{
set_f1("A");
set_f2(123);
set_f3(123.456)
}};
The second sample raises the following Eclipse warning:
The serializable class does not declare a static final serialVersionUID field of type long
I thought that these code samples should be equivalent - what's the difference?