Skip to content

Commit

Permalink
Exclude all classes in 'test-classes' from the serialization test (#4483
Browse files Browse the repository at this point in the history
)

* Exclude all classes in 'test-classes' from the serialization test
  • Loading branch information
Denis authored and ZheSun88 committed Aug 6, 2018
1 parent 4c5bcae commit 92f9b37
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,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
*
Expand Down Expand Up @@ -285,7 +290,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<>();
Expand Down

0 comments on commit 92f9b37

Please sign in to comment.