mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 11:35:57 +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
|
## Unreleased
|
||||||
### Fixed
|
### Fixed
|
||||||
- Null Pointer Exception on anonymous migration with deleted repositories ([#1371](https://github.com/scm-manager/scm-manager/pull/1371))
|
- 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
|
## [2.7.0] - 2020-10-12
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -193,8 +193,11 @@ public class SvnBrowseCommand extends AbstractSvnCommand
|
|||||||
|
|
||||||
repository.getDir(entry.getRelativePath(), revision, properties, (Collection) null);
|
repository.getDir(entry.getRelativePath(), revision, properties, (Collection) null);
|
||||||
|
|
||||||
String[] externals = properties.getStringValue(SVNProperty.EXTERNALS).split("\\r?\\n");
|
String externals = properties.getStringValue(SVNProperty.EXTERNALS);
|
||||||
for (String external : externals) {
|
|
||||||
|
if (!Strings.isNullOrEmpty(externals)) {
|
||||||
|
String[] splitExternals = externals.split("\\r?\\n");
|
||||||
|
for (String external : splitExternals) {
|
||||||
String subRepoUrl = "";
|
String subRepoUrl = "";
|
||||||
String subRepoPath = "";
|
String subRepoPath = "";
|
||||||
for (String externalPart : external.split(" ")) {
|
for (String externalPart : external.split(" ")) {
|
||||||
@@ -210,6 +213,8 @@ public class SvnBrowseCommand extends AbstractSvnCommand
|
|||||||
fileObject.addChild(createSubRepoDirectory(subRepository, subRepoPath));
|
fileObject.addChild(createSubRepoDirectory(subRepository, subRepoPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (SVNException ex) {
|
} catch (SVNException ex) {
|
||||||
logger.error("could not fetch file properties", ex);
|
logger.error("could not fetch file properties", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user