add null check on parsing svn properties in browsecommand

This commit is contained in:
Eduard Heimbuch
2020-10-14 10:47:03 +02:00
parent 12e01825e8
commit d273b19f68
2 changed files with 20 additions and 14 deletions

View File

@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Fixed
- Null Pointer Exception on anonymous migration with deleted repositories ([#1371](https://github.com/scm-manager/scm-manager/pull/1371))
- Null Pointer Exception on parsing SVN properties ([#1373](https://github.com/scm-manager/scm-manager/pull/1373))
## [2.7.0] - 2020-10-12
### Added

View File

@@ -193,8 +193,11 @@ public class SvnBrowseCommand extends AbstractSvnCommand
repository.getDir(entry.getRelativePath(), revision, properties, (Collection) null);
String[] externals = properties.getStringValue(SVNProperty.EXTERNALS).split("\\r?\\n");
for (String external : externals) {
String externals = properties.getStringValue(SVNProperty.EXTERNALS);
if (!Strings.isNullOrEmpty(externals)) {
String[] splitExternals = externals.split("\\r?\\n");
for (String external : splitExternals) {
String subRepoUrl = "";
String subRepoPath = "";
for (String externalPart : external.split(" ")) {
@@ -210,6 +213,8 @@ public class SvnBrowseCommand extends AbstractSvnCommand
fileObject.addChild(createSubRepoDirectory(subRepository, subRepoPath));
}
}
}
} catch (SVNException ex) {
logger.error("could not fetch file properties", ex);
}