Skip to content

Commit

Permalink
Make some minor adjustments to GradleAvroProtocolTask due to investig…
Browse files Browse the repository at this point in the history
…ation of apache#174
  • Loading branch information
davidmc24 committed Sep 23, 2021
1 parent 346c4f6 commit 0dca7b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Unreleased
* Built using Gradle 7.2
* Updated compatibility testing through Gradle 7.2
* `GenerateAvroProtocolTask` now has a debug log to output its classpath
* `GenerateAvroProtocolTask` will no longer include a debug log to notify that it's using the system classloader if the classpath is empty

## 1.2.1
* Built using Gradle 7.1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private void processIDLFile(File idlFile, ClassLoader loader) {
}

private ClassLoader assembleClassLoader() {
getLogger().debug("Using classpath: {}", classpath.getFiles());
List<URL> urls = new LinkedList<>();
for (File file : classpath) {
try {
Expand All @@ -116,10 +117,6 @@ private ClassLoader assembleClassLoader() {
getLogger().debug(e.getMessage());
}
}
if (urls.isEmpty()) {
getLogger().debug("No classpath configured; defaulting to system classloader");
}
return urls.isEmpty() ? ClassLoader.getSystemClassLoader()
: new URLClassLoader(urls.toArray(new URL[0]), ClassLoader.getSystemClassLoader());
return new URLClassLoader(urls.toArray(new URL[0]));
}
}

0 comments on commit 0dca7b3

Please sign in to comment.