Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Changes log
- Bugs fixed
- Reuse an instance of Random class in RandomUtils. Issue #1487.
- Complete test classes. Issue #1490.
- Avoid non-short-circuit logic in FileClientHelper. Issue #1495.
-
- Deprecate the implementations of the clone method. Issue #1498.
- Avoid non-short-circuit logic in FileClientHelper. Issue #1495.

- 2.6.0 (29-06-2025)

- 2.6 Release Candidate 2 (21-06-2025)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ImmutableDate(Date date) {

/** {@inheritDoc} */
@Override
public Object clone() {
public Object clone() throws UnsupportedOperationException {
throw new UnsupportedOperationException("ImmutableDate is immutable");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,16 +638,24 @@
return this;
}

/**
* @deprecated Use the {@code copy} method instead.
*/
@Override
@Deprecated

Check warning on line 645 in org.restlet.java/org.restlet/src/main/java/org/restlet/data/Reference.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AZzPD4UiCzAhNf-zwj7J&open=AZzPD4UiCzAhNf-zwj7J&pullRequest=1500
public Reference clone() {

Check warning on line 646 in org.restlet.java/org.restlet/src/main/java/org/restlet/data/Reference.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=restlet_restlet-framework-java&issues=AZzPD4UiCzAhNf-zwj7K&open=AZzPD4UiCzAhNf-zwj7K&pullRequest=1500
return copy();
}

public Reference copy() {
final Reference newRef = new Reference();

if (this.baseRef == null) {
newRef.baseRef = null;
} else if (equals(this.baseRef)) {
newRef.baseRef = newRef;
} else {
newRef.baseRef = this.baseRef.clone();
newRef.baseRef = this.baseRef.copy();
}

newRef.fragmentIndex = this.fragmentIndex;
Expand Down