Skip to content

Commit

Permalink
Rename return parameter to result (#28630)
Browse files Browse the repository at this point in the history
  • Loading branch information
yx9o authored Oct 3, 2023
1 parent 5157ed0 commit 166a16e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public FileVisitResult visitFile(final Path file, final BasicFileAttributes attr
}

private static JDBCRepositorySQL loadFromJar(final URL url, final String type) throws JAXBException, IOException {
JDBCRepositorySQL defaultProvider = null;
JDBCRepositorySQL result = null;
try (JarFile jar = ((JarURLConnection) url.openConnection()).getJarFile()) {
Enumeration<JarEntry> entries = jar.entries();
while (entries.hasMoreElements()) {
Expand All @@ -112,13 +112,14 @@ private static JDBCRepositorySQL loadFromJar(final URL url, final String type) t
final InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
JDBCRepositorySQL provider = (JDBCRepositorySQL) JAXBContext.newInstance(JDBCRepositorySQL.class).createUnmarshaller().unmarshal(inputStream);
if (provider.isDefault()) {
defaultProvider = provider;
result = provider;
}
if (Objects.equals(provider.getType(), type)) {
return provider;
result = provider;
break;
}
}
}
return defaultProvider;
return result;
}
}

0 comments on commit 166a16e

Please sign in to comment.