-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make classes serializable #4148
Conversation
|
||
/** | ||
* An event fired when the value of a {@code HasValue} changes. | ||
* | ||
* @param <V> | ||
* the value type | ||
*/ | ||
interface ValueChangeEvent<V> { | ||
interface ValueChangeEvent<V> extends Serializable { | ||
HasValue<?, V> getHasValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaDoc fails build. |
Reviewed 47 of 54 files at r1, 9 of 10 files at r2. flow-server/src/main/java/com/vaadin/flow/dom/ElementFactory.java, line 28 at r2 (raw file):
This is a mix-in without any single instance method. flow-server/src/main/java/com/vaadin/flow/dom/NodeVisitor.java, line 28 at r2 (raw file):
That may be wrong...... flow-server/src/main/java/com/vaadin/flow/dom/impl/ThemeListImpl.java, line 18 at r2 (raw file):
No other changes in this class. flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java, line 118 at r2 (raw file):
Why ? flow-server/src/main/java/com/vaadin/flow/templatemodel/PropertyMapBuilder.java, line 131 at r2 (raw file):
This is not really needed. flow-server/src/main/java/com/vaadin/flow/templatemodel/TemplateModel.java, line 188 at r2 (raw file):
I would say this is a mistake here to require Serializable. Comments from Reviewable |
Review status: 47 of 53 files reviewed at latest revision, 19 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/dom/ElementFactory.java, line 28 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/dom/NodeVisitor.java, line 28 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java, line 118 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Technically there is no need of the CTOR, it's added to make code self-documented. flow-server/src/main/java/com/vaadin/flow/templatemodel/TemplateModel.java, line 188 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Are Comments from Reviewable |
Reviewed 3 of 9 files at r3. flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java, line 118 at r2 (raw file): Previously, elmot (Ilia Motornyi) wrote…
Don't see how it makes self-documented code for the class which is nested and not visible from anywhere. Extra CTOR just adds more lines and what's bad: this change has no any relation to the main purpose of the PR. But it's minor. flow-server/src/main/java/com/vaadin/flow/templatemodel/TemplateModel.java, line 188 at r2 (raw file): Previously, elmot (Ilia Motornyi) wrote…
That's the question. Comments from Reviewable |
Reviewed 6 of 9 files at r3. flow-server/src/test/java/com/vaadin/tests/server/ClassesSerializableTest.java, line 213 at r3 (raw file):
useless prefix. But it's minor. Comments from Reviewable |
Review status: all files reviewed at latest revision, 17 unresolved discussions, some commit checks failed. flow-server/src/main/java/com/vaadin/flow/templatemodel/TemplateModel.java, line 188 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Ok, I am reverting both. flow-server/src/main/java/com/vaadin/flow/component/internal/ComponentMetaData.java, line 58 at r1 (raw file): Done. flow-server/src/main/java/com/vaadin/flow/component/internal/ComponentMetaData.java, line 59 at r1 (raw file): Done. Comments from Reviewable |
Review status: all files reviewed at latest revision, 17 unresolved discussions, some commit checks failed. flow-server/src/main/java/com/vaadin/flow/templatemodel/TemplateModel.java, line 188 at r2 (raw file): Previously, elmot (Ilia Motornyi) wrote…
No changes. Comments from Reviewable |
Reviewed 4 of 7 files at r4. Comments from Reviewable |
Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks broke. flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateDataAnalyzer.java, line 107 at r1 (raw file):
Done. Comments from Reviewable |
Review status: 42 of 48 files reviewed at latest revision, 5 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/dom/impl/ThemeListImpl.java, line 18 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. Now there are changes flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java, line 118 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/templatemodel/PropertyMapBuilder.java, line 131 at r2 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. Comments from Reviewable |
ArrayList<Field> nonSerializableFunctionFields = new ArrayList<>(); | ||
|
||
List<Class<?>> nonSerializableClasses = new ArrayList<>(); | ||
for (String className : classes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 8 files at r4, 1 of 3 files at r5, 7 of 10 files at r6. flow-test-generic/pom.xml, line 22 at r6 (raw file):
new line Comments from Reviewable |
Review status: 47 of 49 files reviewed at latest revision, 28 unresolved discussions. flow-test-generic/pom.xml, line 22 at r6 (raw file): Previously, denis-anisimov (Denis) wrote…
Done. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 36 at r6 (raw file): Previously, vaadin-bot (Vaadin Bot) wrote…
Done. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 117 at r6 (raw file): Done. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 119 at r6 (raw file): Previously, vaadin-bot (Vaadin Bot) wrote…
Done. Comments from Reviewable |
Reviewed 2 of 3 files at r7. Comments from Reviewable |
} else if (getJarPattern().matcher(file.getName()).matches()) { | ||
classes = findClassesInJar(file); | ||
} else { | ||
logger.debug("Ignoring " + classpathEntry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r9. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 315 at r9 (raw file):
So if I implement a I think it should check something And Comments from Reviewable |
Review status: 48 of 49 files reviewed at latest revision, 1 unresolved discussion. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 315 at r9 (raw file): Previously, denis-anisimov (Denis) wrote…
I also had some concerns about this code. Removed. Comments from Reviewable |
* @throws Throwable serialization goes wrong | ||
*/ | ||
@Test | ||
public void classesSerializable() throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// report non-serializable classes and interfaces | ||
if (!Serializable.class.isAssignableFrom(cls)) { | ||
nonSerializableClasses.add(cls); | ||
// TODO easier to read when testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!Serializable.class.isAssignableFrom(cls)) { | ||
nonSerializableClasses.add(cls); | ||
// TODO easier to read when testing | ||
// System.err.println(cls); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review status: 48 of 49 files reviewed at latest revision, 2 unresolved discussions. flow-test-generic/src/main/java/com/vaadin/flow/testutil/ClassesSerializableTest.java, line 148 at r10 (raw file):
Comments from Reviewable |
*/ | ||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) | ||
public <T> T serializeAndDeserialize(T instance) | ||
throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SonarQube analysis reported 16 issues Watch the comments in this conversation to review them. 9 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Reviewed 1 of 2 files at r11. Comments from Reviewable |
Partial fix for vaadin/platform#173
Related to #4105
This change is