Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing master with upstream #2

Merged
merged 147 commits into from
Apr 4, 2019
Merged

Conversation

mst-avaleo
Copy link
Member

No description provided.

gregturn and others added 30 commits November 26, 2018 15:29
Spring 5.1 is centralizing all Forward header handling. This moves critical bits into one location, making it easy to completely remove once we rebaseline against this version.

Also adds a test profile to ensure Spring 5.1 doesn't break anything.

Original pull request: #717.
Original pull request: #717.
By removing all Jaxb annotations, requesting data from a hypermedia-enabled endpoint inside a browser (which defaults to accept:application/xhtml+xml,*/*), Spring HATEOAS will yield HAL.
* Removed Jaxb annotations from packaga-info.java.
* Simplified Test code by removing unused code a debug output.
* Formatting.
* Updated copyright headers.
Deserializing a Link with a templated URI will cause Jackson to break due to there being no "templated" property. This adds a private, no-op `setTemplated` method to allow deserialization to occur yet not alter the Link..
Spring Framework accepts `null` for header values in HttpHeaders. This is already reflected in the javadocs.
Fully support HAL spec by adding "profile" as another optional attribute to `Link`.

See: https://tools.ietf.org/html/draft-kelly-json-hal-08, https://tools.ietf.org/html/rfc5988
* Moved compilation of Regexp patterns out of methods in order to not repeat it over and over again.
* Applied soft assertions where multiple assertions where used where one failure didn't guarantee the failure of all other assertions.
* Minor formatting.
In HAL-based documents (HAL and HAL-FORMS), the "templated" property must be ignored in LinkMixin, because that's where it is applied. Removes the need for a no-op `setTemplated` method in Link.

* Test cases drafted for both HAL an HAL-FORMS to verify proper behavior.
* Jackson2HalFormsIntegrationTest migrated from Hamcrest to AssertJ assertions.

Related pull requests: #668
The scenarios of using Spring HATEOAS without Spring Plugin are too niche to not support the potential error messages should people use Spring HATEOAS outside of Spring Boot.
Introduces pipeline that replaces the Bambook Spring HATEOAS one which builds on master branch and deploys to artifactory.

Additionally:

* Tests against JDK 8, 11, and 12 before doing the final build and deploy.
* Also handles pull requests, running same suite of tests against mutiple JDKs.
Several test libraries had to be upgraded to their versions that support Java 11 and higher.
To avoid confusion about what to return on a Spring MVC endpoint, change toResources to not return `List<D>`, but instead `Resources<D>`. This clearly ensures when used to construct Spring MVC endpoints, will return a type Spring HATEOAS will properly marshal.

To support people that have already built apps on top of Lists, include a `toList<D>` method that honors the old contract.

Related issues: #493
Related pull requests: #572
Implement a ResourceAssembler based solely on a domain type, returning Resource<T> for the `toResource(obj)` method.

Related issues: #416
Removed redundant asserts.
* Added Tests to demonstrate required functionality.
* Expanding variables correctly to meet RFC spec.  Composite values can be expanded either as a list or as an associative array

Also see https://tools.ietf.org/html/rfc6570#section-2.4.2
Since we can't guarantee the incoming Map is <String,Object>, should only cast as <Object,Object> and use `.toString()` for maximum flexibility.
* Provide a LinkBuilderDsl for help create links.
* Provider an AffordanceBuilderDsl to help create affordances.
Include IANA registry text and link to related standard for each link relation.
* Move Spring MVC method scanning out of the core Affordances API and into SpringMvcAffordanceBuilder to make it easy to use in Spring Data REST (where method scanning isn't needed).
* Also push attributes from Affordance into AffordanceModel to centralize the details.
* Certain serializers must be registered differently due to Jackson's rules of precedence given Spring Data REST needs to override them.
* Formatting.
* Extracted conversion methods.
* Tested and fixed NPE with empty pojo.
* Tested and fixed NPE with empty page meta data.
* Formatting.
* Copyright headers.
* Unused/unneeded methods.
gregturn and others added 29 commits March 5, 2019 10:12
Applied some recommendations provided by IntelliJ that I stumbled over while reviewing the changes.
`URI.create()` wraps `new URI()` and converts a `UriSyntaxException` into an `IllegalArgumentException`.

Also, take advantage of `toUri()`.
Removed some superfluous variables.
Replaces Hamcrest with AssertJ.
Formatting.
Significant rework of the nullability annotation introduction to not produce any warnings anymore. Added nullability annotations where still missing. Removed the ones that were added erroneously.

Tightened nullability contracts in a couple of places, most prominently LinkRelationProvider, that now uses a LookupContext as plugin delimiter so that implementations can selectively be looked up for item or collection link relation lookup.

Removed obsolete declaration of Findbugs dependency.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 1 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 2 occurrences
* http://www.springframework.org/schema/beans with 2 occurrences
* http://www.springframework.org/schema/context with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 2 occurrences
* http://www.w3.org/2005/Atom with 1 occurrences
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://alps.io (200) with 1 occurrences could not be migrated:
   ([https](https://alps.io) result AnnotatedConnectException).
* [ ] http://alps.io/spec/ (200) with 6 occurrences could not be migrated:
   ([https](https://alps.io/spec/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/ (200) with 1 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/examples/ (200) with 7 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/examples/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/format/ (200) with 2 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/format/) result AnnotatedConnectException).
* [ ] http://stateless.co/hal_specification.html (200) with 2 occurrences could not be migrated:
   ([https](https://stateless.co/hal_specification.html) result SSLHandshakeException).
* [ ] http://www.opensearch.org/Specifications/OpenSearch/1.1 (200) with 1 occurrences could not be migrated:
   ([https](https://www.opensearch.org/Specifications/OpenSearch/1.1) result SSLHandshakeException).
* [ ] http://foo.com/bar (301) with 8 occurrences could not be migrated:
   ([https](https://foo.com/bar) result SSLHandshakeException).
* [ ] http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html (302) with 1 occurrences could not be migrated:
   ([https](https://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html) result SSLHandshakeException).
* [ ] http://alps.io/ext/range (404) with 2 occurrences could not be migrated:
   ([https](https://alps.io/ext/range) result AnnotatedConnectException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://tools.ietf.org/html/draft-kelly-json-hal (301) with 2 occurrences migrated to:
  https://tools.ietf.org/html/draft-kelly-json-hal ([https](https://tools.ietf.org/html/draft-kelly-json-hal) result ReadTimeoutException).
* [ ] http://api.acme.com/foo/ (UnknownHostException) with 1 occurrences migrated to:
  https://api.acme.com/foo/ ([https](https://api.acme.com/foo/) result UnknownHostException).
* [ ] http://barfoo:8888 (UnknownHostException) with 2 occurrences migrated to:
  https://barfoo:8888 ([https](https://barfoo:8888) result UnknownHostException).
* [ ] http://examples.org/blogs/jdoe (UnknownHostException) with 7 occurrences migrated to:
  https://examples.org/blogs/jdoe ([https](https://examples.org/blogs/jdoe) result UnknownHostException).
* [ ] http://examples.org/blogs/msmith (UnknownHostException) with 4 occurrences migrated to:
  https://examples.org/blogs/msmith ([https](https://examples.org/blogs/msmith) result UnknownHostException).
* [ ] http://examples.org/blogs/rwilliams (UnknownHostException) with 4 occurrences migrated to:
  https://examples.org/blogs/rwilliams ([https](https://examples.org/blogs/rwilliams) result UnknownHostException).
* [ ] http://examples.org/images/jdoe (UnknownHostException) with 7 occurrences migrated to:
  https://examples.org/images/jdoe ([https](https://examples.org/images/jdoe) result UnknownHostException).
* [ ] http://examples.org/images/msmith (UnknownHostException) with 4 occurrences migrated to:
  https://examples.org/images/msmith ([https](https://examples.org/images/msmith) result UnknownHostException).
* [ ] http://examples.org/images/rwilliams (UnknownHostException) with 4 occurrences migrated to:
  https://examples.org/images/rwilliams ([https](https://examples.org/images/rwilliams) result UnknownHostException).
* [ ] http://foobar (UnknownHostException) with 1 occurrences migrated to:
  https://foobar ([https](https://foobar) result UnknownHostException).
* [ ] http://foobar:8088 (UnknownHostException) with 2 occurrences migrated to:
  https://foobar:8088 ([https](https://foobar:8088) result UnknownHostException).
* [ ] http://foobarhost/ (UnknownHostException) with 2 occurrences migrated to:
  https://foobarhost/ ([https](https://foobarhost/) result UnknownHostException).
* [ ] http://foobarhost:9090/ (UnknownHostException) with 2 occurrences migrated to:
  https://foobarhost:9090/ ([https](https://foobarhost:9090/) result UnknownHostException).
* [ ] http://myhost/cart/42 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost/cart/42 ([https](https://myhost/cart/42) result UnknownHostException).
* [ ] http://myhost/inventory/12 (UnknownHostException) with 3 occurrences migrated to:
  https://myhost/inventory/12 ([https](https://myhost/inventory/12) result UnknownHostException).
* [ ] http://myhost/people/42 (UnknownHostException) with 2 occurrences migrated to:
  https://myhost/people/42 ([https](https://myhost/people/42) result UnknownHostException).
* [ ] http://myhost/person/1 (UnknownHostException) with 1 occurrences migrated to:
  https://myhost/person/1 ([https](https://myhost/person/1) result UnknownHostException).
* [ ] http://myhost/person/1/orders (UnknownHostException) with 1 occurrences migrated to:
  https://myhost/person/1/orders ([https](https://myhost/person/1/orders) result UnknownHostException).
* [ ] http://proxy1:1443 (UnknownHostException) with 2 occurrences migrated to:
  https://proxy1:1443 ([https](https://proxy1:1443) result UnknownHostException).
* [ ] http://somehost/bar (UnknownHostException) with 1 occurrences migrated to:
  https://somehost/bar ([https](https://somehost/bar) result UnknownHostException).
* [ ] http://somehost/foo (UnknownHostException) with 1 occurrences migrated to:
  https://somehost/foo ([https](https://somehost/foo) result UnknownHostException).
* [ ] http://somehost/foo/ (UnknownHostException) with 1 occurrences migrated to:
  https://somehost/foo/ ([https](https://somehost/foo/) result UnknownHostException).
* [ ] http://somehost/foo/bar (UnknownHostException) with 1 occurrences migrated to:
  https://somehost/foo/bar ([https](https://somehost/foo/bar) result UnknownHostException).
* [ ] http://somehost/foo/bar/foobar (UnknownHostException) with 1 occurrences migrated to:
  https://somehost/foo/bar/foobar ([https](https://somehost/foo/bar/foobar) result UnknownHostException).
* [ ] http://somethingDifferent (UnknownHostException) with 2 occurrences migrated to:
  https://somethingDifferent ([https](https://somethingDifferent) result UnknownHostException).
* [ ] http://acme.com/rels/foo-bar (404) with 2 occurrences migrated to:
  https://acme.com/rels/foo-bar ([https](https://acme.com/rels/foo-bar) result 404).
* [ ] http://example.com/api (404) with 2 occurrences migrated to:
  https://example.com/api ([https](https://example.com/api) result 404).
* [ ] http://example.com/custom/deprecated (404) with 1 occurrences migrated to:
  https://example.com/custom/deprecated ([https](https://example.com/custom/deprecated) result 404).
* [ ] http://example.com/customers/deprecated (404) with 6 occurrences migrated to:
  https://example.com/customers/deprecated ([https](https://example.com/customers/deprecated) result 404).
* [ ] http://example.com/rels/ (404) with 2 occurrences migrated to:
  https://example.com/rels/ ([https](https://example.com/rels/) result 404).
* [ ] http://example.com/rels/persons (404) with 1 occurrences migrated to:
  https://example.com/rels/persons ([https](https://example.com/rels/persons) result 404).
* [ ] http://example.org/blogs/wchandry (404) with 3 occurrences migrated to:
  https://example.org/blogs/wchandry ([https](https://example.org/blogs/wchandry) result 404).
* [ ] http://example.org/friends/ (404) with 19 occurrences migrated to:
  https://example.org/friends/ ([https](https://example.org/friends/) result 404).
* [ ] http://example.org/friends/?queries (404) with 3 occurrences migrated to:
  https://example.org/friends/?queries ([https](https://example.org/friends/?queries) result 404).
* [ ] http://example.org/friends/?template (404) with 3 occurrences migrated to:
  https://example.org/friends/?template ([https](https://example.org/friends/?template) result 404).
* [ ] http://example.org/friends/jdoe (404) with 6 occurrences migrated to:
  https://example.org/friends/jdoe ([https](https://example.org/friends/jdoe) result 404).
* [ ] http://example.org/friends/msmith (404) with 3 occurrences migrated to:
  https://example.org/friends/msmith ([https](https://example.org/friends/msmith) result 404).
* [ ] http://example.org/friends/rss (404) with 7 occurrences migrated to:
  https://example.org/friends/rss ([https](https://example.org/friends/rss) result 404).
* [ ] http://example.org/friends/rwilliams (404) with 3 occurrences migrated to:
  https://example.org/friends/rwilliams ([https](https://example.org/friends/rwilliams) result 404).
* [ ] http://example.org/friends/search (404) with 4 occurrences migrated to:
  https://example.org/friends/search ([https](https://example.org/friends/search) result 404).
* [ ] http://example.org/images/wchandry (404) with 3 occurrences migrated to:
  https://example.org/images/wchandry ([https](https://example.org/images/wchandry) result 404).
* [ ] http://example.org/rels/todo (404) with 3 occurrences migrated to:
  https://example.org/rels/todo ([https](https://example.org/rels/todo) result 404).
* [ ] http://example.org/samples/full/doc.html (404) with 3 occurrences migrated to:
  https://example.org/samples/full/doc.html ([https](https://example.org/samples/full/doc.html) result 404).
* [ ] http://pubsubhubbub.googlecode.com (404) with 1 occurrences migrated to:
  https://pubsubhubbub.googlecode.com ([https](https://pubsubhubbub.googlecode.com) result 404).
* [ ] http://www.example.com/rels/ (404) with 1 occurrences migrated to:
  https://www.example.com/rels/ ([https](https://www.example.com/rels/) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://docs.spring.io/spring-hateoas/docs/current/reference/html/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-hateoas/docs/current/reference/html/ ([https](https://docs.spring.io/spring-hateoas/docs/current/reference/html/) result 200).
* [ ] http://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf with 1 occurrences migrated to:
  https://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf ([https](https://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf) result 200).
* [ ] http://en.wikipedia.org/wiki/HATEOAS with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/HATEOAS ([https](https://en.wikipedia.org/wiki/HATEOAS) result 200).
* [ ] http://example.com?name=foo with 1 occurrences migrated to:
  https://example.com?name=foo ([https](https://example.com?name=foo) result 200).
* [ ] http://mamund.site44.com/misc/hal-forms/ with 1 occurrences migrated to:
  https://mamund.site44.com/misc/hal-forms/ ([https](https://mamund.site44.com/misc/hal-forms/) result 200).
* [ ] http://uberhypermedia.org/ (302) with 2 occurrences migrated to:
  https://rawgit.com/uber-hypermedia/specification/master/uber-hypermedia.html ([https](https://uberhypermedia.org/) result 200).
* [ ] http://tools.ietf.org/html/draft-kelly-json-hal-05 with 1 occurrences migrated to:
  https://tools.ietf.org/html/draft-kelly-json-hal-05 ([https](https://tools.ietf.org/html/draft-kelly-json-hal-05) result 200).
* [ ] http://tools.ietf.org/html/rfc6570 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc6570 ([https](https://tools.ietf.org/html/rfc6570) result 200).
* [ ] http://www.example.com with 2 occurrences migrated to:
  https://www.example.com ([https](https://www.example.com) result 200).
* [ ] http://www.hixie.ch/specs/pingback/pingback with 1 occurrences migrated to:
  https://www.hixie.ch/specs/pingback/pingback ([https](https://www.hixie.ch/specs/pingback/pingback) result 200).
* [ ] http://www.iana.org/assignments/link-relations/link-relations.xhtml with 2 occurrences migrated to:
  https://www.iana.org/assignments/link-relations/link-relations.xhtml ([https](https://www.iana.org/assignments/link-relations/link-relations.xhtml) result 200).
* [ ] http://www.w3.org/TR/2011/WD-html5-20110113/links.html with 1 occurrences migrated to:
  https://www.w3.org/TR/2011/WD-html5-20110113/links.html ([https](https://www.w3.org/TR/2011/WD-html5-20110113/links.html) result 200).
* [ ] http://www.w3.org/TR/html5/links.html with 11 occurrences migrated to:
  https://www.w3.org/TR/html5/links.html ([https](https://www.w3.org/TR/html5/links.html) result 200).
* [ ] http://www.w3.org/TR/powder-dr/ with 1 occurrences migrated to:
  https://www.w3.org/TR/powder-dr/ ([https](https://www.w3.org/TR/powder-dr/) result 200).
* [ ] http://www.w3.org/TR/preload/ with 1 occurrences migrated to:
  https://www.w3.org/TR/preload/ ([https](https://www.w3.org/TR/preload/) result 200).
* [ ] http://www.w3.org/TR/resource-hints/ with 1 occurrences migrated to:
  https://www.w3.org/TR/resource-hints/ ([https](https://www.w3.org/TR/resource-hints/) result 200).
* [ ] http://www.w3.org/TR/webmention/ with 1 occurrences migrated to:
  https://www.w3.org/TR/webmention/ ([https](https://www.w3.org/TR/webmention/) result 200).
* [ ] http://amazon.com with 4 occurrences migrated to:
  https://amazon.com ([https](https://amazon.com) result 301).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://www.w3.org/TR/1999/REC-html401-19991224 with 10 occurrences migrated to:
  https://www.w3.org/TR/1999/REC-html401-19991224 ([https](https://www.w3.org/TR/1999/REC-html401-19991224) result 301).
* [ ] http://www.w3.org/TR/curie with 1 occurrences migrated to:
  https://www.w3.org/TR/curie ([https](https://www.w3.org/TR/curie) result 301).
* [ ] http://tools.ietf.org/html/rfc5988=section-4 with 1 occurrences migrated to:
  https://tools.ietf.org/html/rfc5988=section-4 ([https](https://tools.ietf.org/html/rfc5988=section-4) result 302).
* [ ] http://www.springsource.org/download with 1 occurrences migrated to:
  https://www.springsource.org/download ([https](https://www.springsource.org/download) result 302).

# Ignored
These URLs were intentionally ignored.

* http://localhost with 11 occurrences
* http://localhost/ with 1 occurrences
* http://localhost/customers/15 with 1 occurrences
* http://localhost/employees with 56 occurrences
* http://localhost/employees/0 with 34 occurrences
* http://localhost/employees/1 with 15 occurrences
* http://localhost/employees/2 with 24 occurrences
* http://localhost/sample/1/foo with 1 occurrences
* http://localhost/sample/2/bar with 1 occurrences
* http://localhost/something/bar/foo with 2 occurrences
* http://localhost:8080/ with 2 occurrences
* http://localhost:8080/api with 8 occurrences
* http://localhost:8080/api/ with 1 occurrences
* http://localhost:8080/api/employees with 4 occurrences
* http://localhost:8080/employees/1 with 4 occurrences
* http://localhost:8080/foo with 2 occurrences
* http://localhost:8080/my/custom/location with 2 occurrences
* http://localhost:8080/rels with 1 occurrences
* http://localhost:8080/rels/ with 6 occurrences
* http://localhost:8080/test?page=0&filter=foo,bar with 2 occurrences
* http://localhost:8080/your-app with 1 occurrences
* http://localhost:8080/your-app/people with 1 occurrences
* http://www.w3.org/2005/Atom with 1 occurrences
Moved section on forward header handling to the link building section of the documentation describing server side components. Switched to sentence-per-line style for the newly introduced content. Pruned a couple of details about which headers are forwarded as what exactly is supported is likely to change with the components in Spring Framework. A bit of rewording to avoid the impression that Spring HATEOAS itself is providing support for the header forwarding.

Re-ordered the server side support section before the media type one. Some polishing on the inline code examples (syntax highlighting etc.)

Original pull request: #887.
Removed build steps for Spring 5.1 snapshots and 5.2 ones as that's the default version we build against anyway.
Experience has shown that simple names (e.g. `test-jdk8`) is easier to use than verbose ones (e.g. `Test (JDK 8)`). This helps a lot when using the fly CLI and when linking to badge icons.
Added new paragraphs on EntityLinks, ControllerEntityLinks, TypedEntityLinks and using EntityLinks as SPI.

Polished Javadoc of ControllerEntityLinks and its unit tests.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 268 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
@EnableHypermediaSupport now exposes a "stacks" attribute to limit the enablement of hypermedia functionality to a certain web stack.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://alps.io (200) with 1 occurrences could not be migrated:
   ([https](https://alps.io) result AnnotatedConnectException).
* [ ] http://alps.io/spec/ (200) with 6 occurrences could not be migrated:
   ([https](https://alps.io/spec/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/ (200) with 1 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/examples/ (200) with 7 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/examples/) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/format/ (200) with 2 occurrences could not be migrated:
   ([https](https://amundsen.com/media-types/collection/format/) result AnnotatedConnectException).
* [ ] http://stateless.co/hal_specification.html (200) with 2 occurrences could not be migrated:
   ([https](https://stateless.co/hal_specification.html) result SSLHandshakeException).
* [ ] http://users.monash.edu/~damian/papers/HTML/Plurals.html (200) with 1 occurrences could not be migrated:
   ([https](https://users.monash.edu/~damian/papers/HTML/Plurals.html) result SSLHandshakeException).
* [ ] http://www.opensearch.org/Specifications/OpenSearch/1.1 (200) with 1 occurrences could not be migrated:
   ([https](https://www.opensearch.org/Specifications/OpenSearch/1.1) result SSLHandshakeException).
* [ ] http://alps.io/ext/range (404) with 2 occurrences could not be migrated:
   ([https](https://alps.io/ext/range) result AnnotatedConnectException).
* [ ] http://www.foo.com/bar (404) with 8 occurrences could not be migrated:
   ([https](https://www.foo.com/bar) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://tools.ietf.org/html/draft-kelly-json-hal (301) with 1 occurrences migrated to:
  https://tools.ietf.org/html/draft-kelly-json-hal ([https](https://tools.ietf.org/html/draft-kelly-json-hal) result ReadTimeoutException).

# Ignored
These URLs were intentionally ignored.

* http://barfoo:8888 with 2 occurrences
* http://foobar:8088 with 2 occurrences
* http://foobarhost/ with 2 occurrences
* http://foobarhost:9090/ with 2 occurrences
* http://localhost with 11 occurrences
* http://localhost/ with 1 occurrences
* http://localhost/customers/15 with 1 occurrences
* http://localhost/employees with 56 occurrences
* http://localhost/employees/0 with 34 occurrences
* http://localhost/employees/1 with 15 occurrences
* http://localhost/employees/2 with 24 occurrences
* http://localhost/sample/1/foo with 1 occurrences
* http://localhost/sample/2/bar with 1 occurrences
* http://localhost/something/bar/foo with 2 occurrences
* http://localhost:8080/ with 2 occurrences
* http://localhost:8080/api with 8 occurrences
* http://localhost:8080/api/ with 1 occurrences
* http://localhost:8080/api/employees with 4 occurrences
* http://localhost:8080/employees/1 with 4 occurrences
* http://localhost:8080/foo with 2 occurrences
* http://localhost:8080/my/custom/location with 2 occurrences
* http://localhost:8080/rels with 1 occurrences
* http://localhost:8080/rels/ with 6 occurrences
* http://localhost:8080/test?page=0&filter=foo,bar with 2 occurrences
* http://localhost:8080/your-app with 1 occurrences
* http://localhost:8080/your-app/people with 1 occurrences
* http://proxy1:1443 with 2 occurrences
* http://somethingDifferent with 2 occurrences
* http://www.w3.org/2005/Atom with 1 occurrences
Thanks to spring-projects/spring-framework#22612, Spring HATEAOAS no longer has to disable the default registry of encoders and decoders to get its custom components to work.

Related issues: #885, spring-projects/spring-framework#22612
Introduced more caches for reusable value objects: UriTemplate, MethodParameters. Cache UriTemplate.toString() to avoid re-computation. Avoid recomputing the affordances if possible in WebHandler. Removed cache in AnnotatedParametersParameterAccessor as that one now transitively benefits from the one introduced in MethodParameters.

Related ticket: spring-projects/spring-framework#22730.
@mst-avaleo mst-avaleo merged commit 4bf73b9 into avaleo:master Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants