Skip to content

4.0.3 Deprecations and breaking changes

Paulo Lopes edited this page Mar 12, 2021 · 5 revisions

gRPC

ContextServerInterceptor does not expose the internals of the storage anymore

The new API was exposing the internals of the storage, however it was forcing the store to only accept String types. This is wrong. All usages of bind should be replaced with:

class X extends ContextServerInterceptor {
  @Override  
  public void bind(Metadata metadata, ConcurrentMap<String, String> context) {

// replace with
class X extends ContextServerInterceptor {
  @Override  
  public void bind(Metadata metadata) {

Vert.x Web

Relax ending slash rule for wildcard routes

Routes that are defined with a path ending in / are enforced to only match if a request "explicitly" includes the ending slash. This rule can cause trouble with wildcard and is now relaxed. Wildcard routes are defined as /foo/*. In this specific case as the route has to match an open wildcard, the final slash becomes optional so it will match:

# 4.0.0 - 4.0.2 behavior:
/foo - **NO** Match
/foofighters - **NO** Match
/foo/ - Match
/foo/bar - Match

# 4.0.3 behavior:
/foo - Match
/foofighters - **NO** Match
/foo/ - Match
/foo/bar - Match

Vert.x Service Discovery

Removed the autoRegistrationOfImporters attribute from ServiceDiscoveryOptions

The autoRegistrationOfImporters attribute was added in Vert.x 3 but actually never used by the Service Discovery implementation.

This is a breaking change although most users probably won't notice (using this attribute has no effect).

Vertx-Auth

JWTAuth

When authenticating with JSON instead of the typed API the expected format to pass the token is changed to match the validations in place and the codec associated with the typed API:

// Before
new JsonObject().put("jwt", "token...");
// From 4.0.3 onwards
new JsonObject().put("token", "token...");

This change ensures that both JSON and typed APIs are consistent and can be used interchangeably.

Clone this wiki locally