Skip to content

Commit c8820ef

Browse files
authored
Add spotless plugin and fix grammar issues (#1503)
* Add spotless plugin and fix grammar issues * Take into account Sonar comments
1 parent db4d998 commit c8820ef

628 files changed

Lines changed: 72303 additions & 72567 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

copyright.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright notice
33

44
Version 5.0, October 2024
55

6-
Copyright 2005-2024 Qlik
6+
Copyright 2005-2026 Qlik
77

88
The contents of this open source project are subject to the terms of the Apache 2.0 open
99
source license available at http://www.opensource.org/licenses/apache-2.0

mvnw

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mvnw.cmd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

org.restlet.ext.crypto/src/main/java/org/restlet/ext/crypto/AwsAuthenticator.java

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/**
2-
* Copyright 2005-2024 Qlik
3-
*
4-
* The contents of this file is subject to the terms of the Apache 2.0 open
5-
* source license available at http://www.opensource.org/licenses/apache-2.0
6-
*
2+
* Copyright 2005-2026 Qlik
3+
*<p>
4+
* The content of this file is subject to the terms of the Apache 2.0 open
5+
* source license available at https://www.opensource.org/licenses/apache-2.0
6+
*<p>
77
* Restlet is a registered trademark of QlikTech International AB.
88
*/
9-
109
package org.restlet.ext.crypto;
1110

1211
import org.restlet.Context;
@@ -18,58 +17,47 @@
1817

1918
/**
2019
* Authenticator supporting the {@link ChallengeScheme#HTTP_AWS_S3} scheme.
21-
*
20+
*
2221
* @author Jean-Philippe Steinmetz <caskater47@gmail.com>
2322
*/
2423
public class AwsAuthenticator extends ChallengeAuthenticator {
2524
/**
2625
* Creates a new HttpAwsS3Authenticator instance.
27-
*
28-
* @param context
29-
* The context
30-
* @param optional
31-
* Indicates if the authentication success is optional
32-
* @param realm
33-
* The authentication realm
26+
*
27+
* @param context The context
28+
* @param optional Indicates if the authentication success is optional
29+
* @param realm The authentication realm
3430
*/
3531
public AwsAuthenticator(Context context, boolean optional, String realm) {
3632
this(context, optional, realm, new AwsVerifier(null));
3733
}
3834

3935
/**
4036
* Creates a new HttpAwsS3Authenticator instance.
41-
*
42-
* @param context
43-
* The context
44-
* @param optional
45-
* Indicates if the authentication success is optional
46-
* @param realm
47-
* The authentication realm
37+
*
38+
* @param context The context
39+
* @param optional Indicates if the authentication success is optional
40+
* @param realm The authentication realm
4841
* @param verifier
4942
*/
50-
public AwsAuthenticator(Context context, boolean optional, String realm,
51-
Verifier verifier) {
43+
public AwsAuthenticator(Context context, boolean optional, String realm, Verifier verifier) {
5244
super(context, optional, ChallengeScheme.HTTP_AWS_S3, realm, verifier);
5345
}
5446

5547
/**
5648
* Creates a new HttpAwsS3Authenticator instance.
57-
*
58-
* @param context
59-
* The context
60-
* @param realm
61-
* The authentication realm
49+
*
50+
* @param context The context
51+
* @param realm The authentication realm
6252
*/
6353
public AwsAuthenticator(Context context, String realm) {
6454
this(context, false, realm);
6555
}
6656

6757
/**
68-
* Returns the maximum age of a request, in milliseconds, before it is
69-
* considered stale.
70-
* <p>
71-
* A negative or zero value indicates no age restriction. The default value
72-
* is 15 minutes.
58+
* Returns the maximum age of a request, in milliseconds, before it is considered stale.
59+
*
60+
* <p>A negative or zero value indicates no age restriction. The default value is 15 minutes.
7361
*/
7462
public long getMaxRequestAge() {
7563
return getVerifier().getMaxRequestAge();
@@ -81,45 +69,40 @@ public AwsVerifier getVerifier() {
8169
}
8270

8371
/**
84-
* Returns the secret verifier that will be wrapped by the real verifier
85-
* supporting all the HTTP AWS verifications.
86-
*
72+
* Returns the secret verifier that will be wrapped by the real verifier supporting all the HTTP
73+
* AWS verifications.
74+
*
8775
* @return the local wrapped verifier
8876
*/
8977
public LocalVerifier getWrappedVerifier() {
9078
return getVerifier().getWrappedVerifier();
9179
}
9280

9381
/**
94-
* Sets the maximum age of a request, in milliseconds, before it is
95-
* considered stale.
96-
* <p>
97-
* A negative or zero value indicates no age restriction. The default value
98-
* is 15 minutes.
82+
* Sets the maximum age of a request, in milliseconds, before it is considered stale.
83+
*
84+
* <p>A negative or zero value indicates no age restriction. The default value is 15 minutes.
9985
*/
10086
public void setMaxRequestAge(long value) {
10187
getVerifier().setMaxRequestAge(value);
10288
}
10389

10490
/**
105-
* Sets the internal verifier. In general you shouldn't replace it but
106-
* instead set the {@code wrappedVerifier} via the
107-
* {@link #setWrappedVerifier(LocalVerifier)} method.
91+
* Sets the internal verifier. In general, you shouldn't replace it but instead set the {@code
92+
* wrappedVerifier} via the {@link #setWrappedVerifier(LocalVerifier)} method.
10893
*/
10994
@Override
11095
public void setVerifier(Verifier verifier) {
111-
if (!(verifier instanceof AwsVerifier))
112-
throw new IllegalArgumentException();
96+
if (!(verifier instanceof AwsVerifier)) throw new IllegalArgumentException();
11397

11498
super.setVerifier(verifier);
11599
}
116100

117101
/**
118-
* Sets the secret verifier that will be wrapped by the real verifier
119-
* supporting all the HTTP AWS verifications.
120-
*
121-
* @param verifier
122-
* The local verifier to wrap
102+
* Sets the secret verifier that will be wrapped by the real verifier supporting all the HTTP
103+
* AWS verifications.
104+
*
105+
* @param verifier The local verifier to wrap
123106
*/
124107
public void setWrappedVerifier(LocalVerifier verifier) {
125108
getVerifier().setWrappedVerifier(verifier);

0 commit comments

Comments
 (0)