Skip to content

Commit

Permalink
Fix indexoutofboundsexception when getting path '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsCharlier committed Sep 20, 2016
1 parent ea7ce13 commit b05d5f2
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -115,8 +115,9 @@ public JDBCResourceStore(DataSource ds, JDBCResourceStoreProperties config, Reso

@Override
public Resource get(String path) {
if (oldResourceStore != null && !path.equals(Paths.BASE) &&
ArrayUtils.contains(dir.getConfig().getIgnoreDirs(), Paths.names(path).get(0))) {
List<String> pathNames = Paths.names(path);
if (oldResourceStore != null && pathNames.size() > 0 &&
ArrayUtils.contains(dir.getConfig().getIgnoreDirs(), pathNames.get(0))) {
return oldResourceStore.get(path);
}
return new JDBCResource(dir.createEntry(path));
Expand Down

0 comments on commit b05d5f2

Please sign in to comment.