jgit/org.eclipse.jgit.lfs
Thomas Wolf aa052ea099 LFS: make pointer parsing more robust
Parsing an LFS pointer must check the input more to not run into
exceptions. LfsPoint.parseLfsPointer() is used in various places to
determine whether a blob is a LFS pointer; it is not only called with
valid LFS pointers. Tighten the validations and return null if they
fail. All callers already do check for a null return value.

Also, LfsPointer implemented Comparable but did not override equals().
This is rather unusual and actually warned against in the javadoc of
Comparable. Implement equals() and hashCode().

Add more tests.

Bug: 570744
Change-Id: I90ca264d0a250275cf1907e9dcfcee5eab80df0f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-31 10:31:10 +01:00
..
.settings Enable and fix "Statement unnecessarily nested within else clause" warnings 2019-10-17 10:20:14 +09:00
META-INF Correct the minimum required version of Apache httpclient 2021-01-18 16:18:09 +01:00
resources/org/eclipse/jgit/lfs/internal Propagate failure of ssh command to caller of SshSupport 2018-06-13 11:24:24 +02:00
src/org/eclipse/jgit/lfs LFS: make pointer parsing more robust 2021-01-31 10:31:10 +01:00
.classpath Change JGit minimum execution environment to JavaSE-1.8 2016-09-20 11:32:36 +02:00
.fbprefs Implement SHA-256 abstraction 2016-02-04 17:49:42 +01:00
.gitignore Implement SHA-256 abstraction 2016-02-04 17:49:42 +01:00
.project Implement SHA-256 abstraction 2016-02-04 17:49:42 +01:00
BUILD Bazel: Add fixes for --incompatible_load_java_rules_from_bzl 2019-09-07 15:36:11 +09:00
about.html Implement SHA-256 abstraction 2016-02-04 17:49:42 +01:00
build.properties Implement SHA-256 abstraction 2016-02-04 17:49:42 +01:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.11.0-SNAPSHOT builds 2020-12-02 15:57:16 +01:00