History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3776
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: Bas Leijdekkers
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

"Externalizable class should have public no-args constructor" warning false negative

Created: 26 Sep 05 14:13   Updated: 24 Oct 06 16:11
Component/s: Editor. Error Highlighting
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 3,496
Severity: Medium


 Description  « Hide
There is a warning displayed when the constructor in the following class is uncommented. Because this class is not public this warning should also be displayed when no constructor is present. (The default constructor is given the access modifier of its containing class JLS 2nd edition 8.8.7).

class NoConstructor implements Externalizable {

//private NoConstructor() {}

public void writeExternal(ObjectOutput out) throws IOException {
}

public void readExternal(ObjectInput in)
throws IOException, ClassNotFoundException {
}
}

Also this warning should probably be an inspection (in the "Serialization issues" group) so it can be given a higher severity (or disabled).



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.