Skip to content
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

Exclude all classes in 'test-classes' from the serialization test #4483

Merged
merged 1 commit into from
Aug 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Exclude all classes in 'test-classes' from the serialization test
Denis Anisimov committed Aug 6, 2018
commit 29814cd7286d8e664778db61ddbc4df0d711f847
Original file line number Diff line number Diff line change
@@ -146,6 +146,11 @@ protected Stream<String> getExcludedPatterns() {
"com\\.vaadin\\.flow\\.templatemodel\\.BeanContainingBeans(\\$.*)?");
}

protected boolean isTestClassPath(String classPath) {
File file = new File(classPath);
return "test-classes".equals(file.getName());
}

/**
* Performs actual serialization/deserialization
*
@@ -287,7 +292,9 @@ public void classesSerializable() throws Throwable {
List<String> classes = new ArrayList<>();
List<Pattern> excludes = getExcludedPatterns().map(Pattern::compile).collect(Collectors.toList());
for (String location : rawClasspathEntries) {
classes.addAll(findServerClasses(location, excludes));
if (!isTestClassPath(location)) {
classes.addAll(findServerClasses(location, excludes));
}
}

ArrayList<Field> nonSerializableFunctionFields = new ArrayList<>();