fge / uri-template

A fully functional Java implementation of URI templates (RFC 6570): create URIs for your REST API without room for errors
Other
54 stars 17 forks source link

Remove guava dependency #4

Open trajano opened 9 years ago

trajano commented 9 years ago

Though Guava can provide an easier API to do some common operations, there can be dependency convergence problems when different versions of Guava are used between different dependencies.

Guava also has the tendency to deprecate APIs between versions.

Primarily to avoid situations like this http://stackoverflow.com/questions/28368289/use-multiple-guava-versions-in-same-maven-project

fge commented 9 years ago

I have to agree with that.

Since my current job has led me to experience such problems, the two solutions would be to:

Not sure where the library should go:

trajano commented 9 years ago

I would go with the later. Something along the lines of using the maven-shade-plugin. Not because it's nicer, in fact it's way way uglier with the larger disk space. However, it is more pragmatic and we can slowly introduce pull requests to get rid of it as time passes by.

trajano commented 9 years ago

Chose the first approach for my PR. Only copied the classes that are relevant and took out the "Guava" checks in the Guava code.

jameskhedley commented 6 years ago

Additionally, the current Guava level (16.0.1, see project.gradle) is vulnerable according to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10237.

Using Guava 26.0 breaks because the character definitions in CharMatcher have been removed (had been deprecated for a while).

https://github.com/google/guava/commit/f1249c4f0449260ff123e8da6b921a37fc058147#diff-27c92738a318c1015c6a15340c0f0d37

Guava 25.1 will work for the time being.