Skip to content

Commit 7d8c420

Browse files
tgeensodrotbohm
authored andcommitted
GH-2084 - Fix nullability declaration for with…(…) methods in Link.
Original pull request: GH-2088.
1 parent 96523d1 commit 7d8c420

File tree

1 file changed

+7
-7
lines changed
  • src/main/java/org/springframework/hateoas

1 file changed

+7
-7
lines changed

Diff for: src/main/java/org/springframework/hateoas/Link.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public Link withHref(String href) {
476476
* @param hreflang
477477
* @return
478478
*/
479-
public Link withHreflang(String hreflang) {
479+
public Link withHreflang(@Nullable String hreflang) {
480480

481481
return this.hreflang == hreflang ? this
482482
: new Link(this.rel, this.href, hreflang, this.media, this.title, this.type, this.deprecation, this.profile,
@@ -489,7 +489,7 @@ public Link withHreflang(String hreflang) {
489489
* @param media
490490
* @return
491491
*/
492-
public Link withMedia(String media) {
492+
public Link withMedia(@Nullable String media) {
493493

494494
return this.media == media ? this
495495
: new Link(this.rel, this.href, this.hreflang, media, this.title, this.type, this.deprecation, this.profile,
@@ -502,7 +502,7 @@ public Link withMedia(String media) {
502502
* @param title
503503
* @return
504504
*/
505-
public Link withTitle(String title) {
505+
public Link withTitle(@Nullable String title) {
506506

507507
return this.title == title ? this
508508
: new Link(this.rel, this.href, this.hreflang, this.media, title, this.type, this.deprecation, this.profile,
@@ -515,7 +515,7 @@ public Link withTitle(String title) {
515515
* @param type
516516
* @return
517517
*/
518-
public Link withType(String type) {
518+
public Link withType(@Nullable String type) {
519519

520520
return this.type == type ? this
521521
: new Link(this.rel, this.href, this.hreflang, this.media, this.title, type, this.deprecation, this.profile,
@@ -528,7 +528,7 @@ public Link withType(String type) {
528528
* @param deprecation
529529
* @return
530530
*/
531-
public Link withDeprecation(String deprecation) {
531+
public Link withDeprecation(@Nullable String deprecation) {
532532

533533
return this.deprecation == deprecation ? this
534534
: new Link(this.rel, this.href, this.hreflang, this.media, this.title, this.type, deprecation, this.profile,
@@ -541,7 +541,7 @@ public Link withDeprecation(String deprecation) {
541541
* @param profile
542542
* @return
543543
*/
544-
public Link withProfile(String profile) {
544+
public Link withProfile(@Nullable String profile) {
545545

546546
return this.profile == profile ? this
547547
: new Link(this.rel, this.href, this.hreflang, this.media, this.title, this.type, this.deprecation, profile,
@@ -554,7 +554,7 @@ public Link withProfile(String profile) {
554554
* @param name
555555
* @return
556556
*/
557-
public Link withName(String name) {
557+
public Link withName(@Nullable String name) {
558558

559559
return this.name == name ? this
560560
: new Link(this.rel, this.href, this.hreflang, this.media, this.title, this.type, this.deprecation,

0 commit comments

Comments
 (0)