Commit 6c24ee58 authored by agurov's avatar agurov

NumberFormatException while performing "Synchronize with repository" [ID-FE6ZC] (bug 465812)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=465812

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21481 ee007c2a-0a25-0410-9ab9-bf268980928c
parent c3952a8a
......@@ -421,8 +421,14 @@ public abstract class AbstractSVNStorage implements ISVNStorage {
SVNRevision selectedRevision = this.convertToRevision(revisionKind, revNum, false);
SVNRevision pegRevision = null;
if (data.length > 6) {
int pegKind = Integer.parseInt(data[6]);
long pegNum = Long.parseLong(data[7]);
int pegKind;
try {
pegKind = Integer.parseInt(data[6]);
}
catch (NumberFormatException ex) { // in order to prevent crashing on improperly stored data (see bug 465812)
pegKind = pegNum > 0 ? SVNRevision.Kind.NUMBER.id : SVNRevision.Kind.HEAD.id;
}
pegRevision = this.convertToRevision(pegKind, pegNum, true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment