Skip to content

Commit 957a2cb

Browse files
committed
Fix typos in method names and exception classes across multiple files
1 parent 9c1de2f commit 957a2cb

19 files changed

+56
-56
lines changed

Diff for: chart/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ restHeartConfiguration:
189189
# It can be an absolute path (eg. /api) or path template (eg. /{foo}/bar/*).
190190
# The values of the path templates properties are available:
191191
# - in the 'what' property (e.g. what: /{foo}_db/coll)
192-
# - programmatically from MongoRequest.getPathTemplateParamenters() method.
192+
# - programmatically from MongoRequest.getPathTemplateParameters() method.
193193
#
194194
# It is not possible to mix absolute paths and path templates: 'where' URIs
195195
# need to be either all absolute paths or all path templates.

Diff for: commons/src/main/java/org/restheart/exchange/IllegalQueryParamenterException.java renamed to commons/src/main/java/org/restheart/exchange/IllegalQueryParameterException.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
*
2424
* @author Andrea Di Cesare {@literal <[email protected]>}
2525
*/
26-
public class IllegalQueryParamenterException extends Exception {
26+
public class IllegalQueryParameterException extends Exception {
2727

2828
private static final long serialVersionUID = 3012988294234123826L;
2929

3030
/**
3131
*
3232
* @param message
3333
*/
34-
public IllegalQueryParamenterException(String message) {
34+
public IllegalQueryParameterException(String message) {
3535
super(message);
3636
}
3737

@@ -40,7 +40,7 @@ public IllegalQueryParamenterException(String message) {
4040
* @param message
4141
* @param cause
4242
*/
43-
public IllegalQueryParamenterException(String message, Throwable cause) {
43+
public IllegalQueryParameterException(String message, Throwable cause) {
4444
super(message, cause);
4545
}
4646
}

Diff for: commons/src/main/java/org/restheart/exchange/MongoRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ public String getMappedRequestUri() {
10161016
*
10171017
* @return
10181018
*/
1019-
public Map<String, String> getPathTemplateParamenters() {
1019+
public Map<String, String> getPathTemplateParameters() {
10201020
if (this.pathTemplateMatch == null) {
10211021
return null;
10221022
} else {

Diff for: commons/src/main/java/org/restheart/utils/RepresentationUtils.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.bson.types.ObjectId;
4040
import org.restheart.exchange.ExchangeKeys.DOC_ID_TYPE;
4141
import static org.restheart.exchange.ExchangeKeys.DOC_ID_TYPE_QPARAM_KEY;
42-
import org.restheart.exchange.IllegalQueryParamenterException;
42+
import org.restheart.exchange.IllegalQueryParameterException;
4343
import org.restheart.exchange.MongoRequest;
4444
import org.restheart.exchange.MongoResponse;
4545
import org.restheart.exchange.UnsupportedDocumentIdException;
@@ -60,11 +60,11 @@ public class RepresentationUtils {
6060
* @param exchange
6161
* @param size
6262
* @return
63-
* @throws IllegalQueryParamenterException
63+
* @throws IllegalQueryParameterException
6464
*/
6565
public static TreeMap<String, String> getPaginationLinks(
6666
HttpServerExchange exchange,
67-
long size) throws IllegalQueryParamenterException {
67+
long size) throws IllegalQueryParameterException {
6868
var request = MongoRequest.of(exchange);
6969

7070
String requestPath = URLUtils.removeTrailingSlashes(exchange.getRequestPath());

Diff for: commons/src/main/resources/META-INF/native-image/org.restheart/restheart-commons/reflect-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4413,7 +4413,7 @@
44134413
"allDeclaredClasses": true
44144414
},
44154415
{
4416-
"name": "org.restheart.exchange.IllegalQueryParamenterException",
4416+
"name": "org.restheart.exchange.IllegalQueryParameterException",
44174417
"allPublicFields": true,
44184418
"allPublicConstructors": true,
44194419
"allDeclaredConstructors": true,

Diff for: core/src/main/resources/restheart-default-config-no-mongodb.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ mongo:
236236
# It can be an absolute path (eg. /api) or path template (eg. /{foo}/bar/*).
237237
# The values of the path templates properties are available:
238238
# - in the 'what' property (e.g. what: /{foo}_db/coll)
239-
# - programmatically from MongoRequest.getPathTemplateParamenters() method.
239+
# - programmatically from MongoRequest.getPathTemplateParameters() method.
240240
#
241241
# It is not possible to mix absolute paths and path templates: 'where' URIs
242242
# need to be either all absolute paths or all path templates.

Diff for: core/src/main/resources/restheart-default-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ mongo:
236236
# It can be an absolute path (eg. /api) or path template (eg. /{foo}/bar/*).
237237
# The values of the path templates properties are available:
238238
# - in the 'what' property (e.g. what: /{foo}_db/coll)
239-
# - programmatically from MongoRequest.getPathTemplateParamenters() method.
239+
# - programmatically from MongoRequest.getPathTemplateParameters() method.
240240
#
241241
# It is not possible to mix absolute paths and path templates: 'where' URIs
242242
# need to be either all absolute paths or all path templates.

Diff for: mongodb/src/main/java/org/restheart/mongodb/db/Databases.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.restheart.exchange.ExchangeKeys.METHOD;
4545
import org.restheart.exchange.ExchangeKeys.WRITE_MODE;
4646
import static org.restheart.exchange.ExchangeKeys.META_COLLNAME;
47-
import org.restheart.exchange.IllegalQueryParamenterException;
47+
import org.restheart.exchange.IllegalQueryParameterException;
4848
import org.restheart.exchange.MongoRequest;
4949
import org.restheart.mongodb.RHMongoClients;
5050
import org.restheart.mongodb.RSOps;
@@ -194,7 +194,7 @@ public BsonDocument getDatabaseProperties(final Optional<ClientSession> cs, Opti
194194
* @param pagesize
195195
* @param noCache
196196
* @return the db data
197-
* @throws org.restheart.exchange.IllegalQueryParamenterException
197+
* @throws org.restheart.exchange.IllegalQueryParameterException
198198
*
199199
*/
200200
public BsonArray getDatabaseData(
@@ -204,7 +204,7 @@ public BsonArray getDatabaseData(
204204
final List<String> colls,
205205
final int page,
206206
final int pagesize,
207-
boolean noCache) throws IllegalQueryParamenterException {
207+
boolean noCache) throws IllegalQueryParameterException {
208208
// filter out reserved resources
209209
var _colls = colls.stream()
210210
.filter(coll -> !MongoRequest.isReservedCollectionName(coll))

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/AbstractRepresentationFactory.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.TreeMap;
2626
import org.bson.BsonArray;
2727
import org.bson.BsonInt32;
28-
import org.restheart.exchange.IllegalQueryParamenterException;
28+
import org.restheart.exchange.IllegalQueryParameterException;
2929
import org.restheart.exchange.MongoRequest;
3030
import org.restheart.mongodb.utils.MongoURLUtils;
3131
import org.restheart.utils.RepresentationUtils;
@@ -42,13 +42,13 @@ abstract class AbstractRepresentationFactory {
4242
* @param embeddedData
4343
* @param size
4444
* @return the resource HAL representation
45-
* @throws IllegalQueryParamenterException
45+
* @throws IllegalQueryParameterException
4646
*/
4747
public abstract Resource getRepresentation(
4848
HttpServerExchange exchange,
4949
BsonArray embeddedData,
5050
long size)
51-
throws IllegalQueryParamenterException;
51+
throws IllegalQueryParameterException;
5252

5353
/**
5454
*
@@ -143,13 +143,13 @@ protected String buildRequestPath(final HttpServerExchange exchange) {
143143
* @param exchange
144144
* @param size
145145
* @param rep
146-
* @throws IllegalQueryParamenterException
146+
* @throws IllegalQueryParameterException
147147
*/
148148
protected void addPaginationLinks(
149149
HttpServerExchange exchange,
150150
long size,
151151
final Resource rep)
152-
throws IllegalQueryParamenterException {
152+
throws IllegalQueryParameterException {
153153
var request = MongoRequest.of(exchange);
154154
if (request.getPagesize() > 0) {
155155
TreeMap<String, String> links;

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/AggregationResultRepresentationFactory.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import io.undertow.server.HttpServerExchange;
2424
import org.bson.BsonArray;
2525
import org.bson.BsonInt32;
26-
import org.restheart.exchange.IllegalQueryParamenterException;
26+
import org.restheart.exchange.IllegalQueryParameterException;
2727
import org.restheart.exchange.MongoRequest;
2828
import org.restheart.mongodb.utils.MongoURLUtils;
2929

@@ -46,13 +46,13 @@ public AggregationResultRepresentationFactory() {
4646
* @param embeddedData
4747
* @param size
4848
* @return
49-
* @throws IllegalQueryParamenterException
49+
* @throws IllegalQueryParameterException
5050
*/
5151
@Override
5252
public Resource getRepresentation(HttpServerExchange exchange,
5353
BsonArray embeddedData,
5454
long size)
55-
throws IllegalQueryParamenterException {
55+
throws IllegalQueryParameterException {
5656
var request = MongoRequest.of(exchange);
5757

5858
final String requestPath = buildRequestPath(exchange);
@@ -77,7 +77,7 @@ public Resource getRepresentation(HttpServerExchange exchange,
7777

7878
private void addEmbeddedData(BsonArray embeddedData,
7979
final Resource rep)
80-
throws IllegalQueryParamenterException {
80+
throws IllegalQueryParameterException {
8181
if (embeddedData != null) {
8282
addReturnedProperty(embeddedData, rep);
8383

@@ -96,7 +96,7 @@ private void addLinkTemplates(final Resource rep,
9696
}
9797

9898
private void embeddedDocuments(BsonArray embeddedData,
99-
Resource rep) throws IllegalQueryParamenterException {
99+
Resource rep) throws IllegalQueryParameterException {
100100
embeddedData.stream()
101101
.filter(d -> d != null)
102102
.filter(d -> d.isDocument())

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/BulkResultRepresentationFactory.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.bson.BsonArray;
2929
import org.bson.BsonInt32;
3030
import org.bson.BsonString;
31-
import org.restheart.exchange.IllegalQueryParamenterException;
31+
import org.restheart.exchange.IllegalQueryParameterException;
3232
import org.restheart.exchange.MongoResponse;
3333
import org.restheart.mongodb.db.BulkOperationResult;
3434
import org.restheart.mongodb.utils.ResponseHelper;
@@ -52,10 +52,10 @@ public BulkResultRepresentationFactory() {
5252
* @param exchange
5353
* @param result
5454
* @return
55-
* @throws IllegalQueryParamenterException
55+
* @throws IllegalQueryParameterException
5656
*/
5757
public Resource getRepresentation(HttpServerExchange exchange, BulkOperationResult result)
58-
throws IllegalQueryParamenterException {
58+
throws IllegalQueryParameterException {
5959
final String requestPath = buildRequestPath(exchange);
6060
final Resource rep = createRepresentation(exchange, null);
6161

@@ -69,10 +69,10 @@ public Resource getRepresentation(HttpServerExchange exchange, BulkOperationResu
6969
* @param exchange
7070
* @param mbwe
7171
* @return
72-
* @throws IllegalQueryParamenterException
72+
* @throws IllegalQueryParameterException
7373
*/
7474
public Resource getRepresentation(HttpServerExchange exchange, MongoBulkWriteException mbwe)
75-
throws IllegalQueryParamenterException {
75+
throws IllegalQueryParameterException {
7676
final String requestPath = buildRequestPath(exchange);
7777
final Resource rep = createRepresentation(exchange, exchange.getRequestPath());
7878

@@ -215,12 +215,12 @@ private void addWriteErrors(
215215
* @param embeddedData
216216
* @param size
217217
* @return
218-
* @throws IllegalQueryParamenterException
218+
* @throws IllegalQueryParameterException
219219
*/
220220
@Override
221221
public Resource getRepresentation(HttpServerExchange exchange,
222222
BsonArray embeddedData, long size)
223-
throws IllegalQueryParamenterException {
223+
throws IllegalQueryParameterException {
224224
throw new UnsupportedOperationException("Not supported."); //To change body of generated methods, choose Tools | Templates.
225225
}
226226
}

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/CollectionRepresentationFactory.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.restheart.exchange.ExchangeKeys.TYPE;
3333
import static org.restheart.exchange.ExchangeKeys._AGGREGATIONS;
3434
import static org.restheart.exchange.ExchangeKeys._STREAMS;
35-
import org.restheart.exchange.IllegalQueryParamenterException;
35+
import org.restheart.exchange.IllegalQueryParameterException;
3636
import org.restheart.exchange.MongoRequest;
3737
import org.restheart.mongodb.handlers.aggregation.AbstractAggregationOperation;
3838
import org.restheart.mongodb.utils.MongoURLUtils;
@@ -103,14 +103,14 @@ public CollectionRepresentationFactory() {
103103
* @param embeddedData
104104
* @param size
105105
* @return
106-
* @throws IllegalQueryParamenterException
106+
* @throws IllegalQueryParameterException
107107
*/
108108
@Override
109109
public Resource getRepresentation(
110110
HttpServerExchange exchange,
111111
BsonArray embeddedData,
112112
long size)
113-
throws IllegalQueryParamenterException {
113+
throws IllegalQueryParameterException {
114114
var request = MongoRequest.of(exchange);
115115

116116
final String requestPath = buildRequestPath(exchange);
@@ -158,7 +158,7 @@ private void addEmbeddedData(
158158
final Resource rep,
159159
final String requestPath,
160160
final HttpServerExchange exchange)
161-
throws IllegalQueryParamenterException {
161+
throws IllegalQueryParameterException {
162162
if (embeddedData != null) {
163163
addReturnedProperty(embeddedData, rep);
164164

@@ -285,7 +285,7 @@ private void embeddedDocuments(
285285
String requestPath,
286286
HttpServerExchange exchange,
287287
Resource rep)
288-
throws IllegalQueryParamenterException {
288+
throws IllegalQueryParameterException {
289289
var request = MongoRequest.of(exchange);
290290

291291
for (BsonValue _d : embeddedData) {

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/DBRepresentationFactory.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import static org.restheart.exchange.ExchangeKeys.FS_FILES_SUFFIX;
3232
import org.restheart.exchange.ExchangeKeys.TYPE;
3333
import static org.restheart.exchange.ExchangeKeys._SCHEMAS;
34-
import org.restheart.exchange.IllegalQueryParamenterException;
34+
import org.restheart.exchange.IllegalQueryParameterException;
3535
import org.restheart.exchange.MongoRequest;
3636
import org.restheart.mongodb.utils.MongoURLUtils;
3737
import org.slf4j.Logger;
@@ -82,14 +82,14 @@ public DBRepresentationFactory() {
8282
* @param embeddedData
8383
* @param size
8484
* @return
85-
* @throws IllegalQueryParamenterException
85+
* @throws IllegalQueryParameterException
8686
*/
8787
@Override
8888
public Resource getRepresentation(
8989
HttpServerExchange exchange,
9090
BsonArray embeddedData,
9191
long size)
92-
throws IllegalQueryParamenterException {
92+
throws IllegalQueryParameterException {
9393
var request = MongoRequest.of(exchange);
9494

9595
final String requestPath = buildRequestPath(exchange);

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/DocumentRepresentationFactory.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.bson.types.ObjectId;
2929
import static org.restheart.exchange.ExchangeKeys.BINARY_CONTENT;
3030
import org.restheart.exchange.ExchangeKeys.TYPE;
31-
import org.restheart.exchange.IllegalQueryParamenterException;
31+
import org.restheart.exchange.IllegalQueryParameterException;
3232
import org.restheart.exchange.InvalidMetadataException;
3333
import org.restheart.exchange.MongoRequest;
3434
import org.restheart.exchange.MongoResponse;
@@ -127,12 +127,12 @@ public DocumentRepresentationFactory() {
127127
* @param exchange
128128
* @param data
129129
* @return
130-
* @throws IllegalQueryParamenterException
130+
* @throws IllegalQueryParameterException
131131
*/
132132
public Resource getRepresentation(String href,
133133
HttpServerExchange exchange,
134134
BsonDocument data)
135-
throws IllegalQueryParamenterException {
135+
throws IllegalQueryParameterException {
136136
var request = MongoRequest.of(exchange);
137137
var response = MongoResponse.of(exchange);
138138

Diff for: mongodb/src/main/java/org/restheart/mongodb/hal/HALRepresentation.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.bson.BsonArray;
2626
import org.bson.BsonDocument;
2727
import org.bson.BsonValue;
28-
import org.restheart.exchange.IllegalQueryParamenterException;
28+
import org.restheart.exchange.IllegalQueryParameterException;
2929
import org.restheart.exchange.MongoRequest;
3030
import org.restheart.exchange.MongoResponse;
3131
import org.restheart.mongodb.MongoService;
@@ -110,7 +110,7 @@ private BsonDocument std2HAL(MongoRequest request, MongoResponse response, BsonV
110110
return factory
111111
.getRepresentation(MongoURLUtils.removeTrailingSlashes(request.getPath()), request.getExchange(), content == null ? null : content.asDocument())
112112
.asBsonDocument();
113-
} catch (IllegalQueryParamenterException iqpe) {
113+
} catch (IllegalQueryParameterException iqpe) {
114114
//shoudn't happen
115115
throw new IllegalStateException(iqpe);
116116
}
@@ -125,7 +125,7 @@ private BsonDocument std2HAL(MongoRequest request, MongoResponse response, BsonV
125125
try {
126126
return factory.getRepresentation(request.getExchange(),
127127
(BulkOperationResult) response.getDbOperationResult()).asBsonDocument();
128-
} catch (IllegalQueryParamenterException iqpe) {
128+
} catch (IllegalQueryParameterException iqpe) {
129129
// shoudn't happen
130130
throw new IllegalStateException(iqpe);
131131
}
@@ -151,7 +151,7 @@ private BsonDocument std2HAL(MongoRequest request, MongoResponse response, BsonV
151151
return factory
152152
.getRepresentation(request.getExchange(), content == null ? null : content.asArray(), response.getCount())
153153
.asBsonDocument();
154-
} catch (IllegalQueryParamenterException iqpe) {
154+
} catch (IllegalQueryParameterException iqpe) {
155155
// shoudn't happen
156156
throw new IllegalStateException(iqpe);
157157
}

0 commit comments

Comments
 (0)