mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 19:15:52 +01:00
add null check on parsing svn properties in browsecommand
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user