Skip to content

Commit

Permalink
Fix spell
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 23, 2022
1 parent 00286b3 commit 9a50a72
Show file tree
Hide file tree
Showing 27 changed files with 89 additions and 85 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
- No intermediate Docker image [\#1596](https://github.com/mapfish/mapfish-print/pull/1596) ([sbrunner](https://github.com/sbrunner))
- \[Backport master\] Use Ubuntu 20.04 [\#1578](https://github.com/mapfish/mapfish-print/pull/1578) ([c2c-bot-gis-ci](https://github.com/c2c-bot-gis-ci))
- \[Backport master\] Fix clean Docker hub tags [\#1577](https://github.com/mapfish/mapfish-print/pull/1577) ([c2c-bot-gis-ci](https://github.com/c2c-bot-gis-ci))
- \[Backport master\] Use secret defined in organisation [\#1569](https://github.com/mapfish/mapfish-print/pull/1569) ([c2c-bot-gis-ci](https://github.com/c2c-bot-gis-ci))
- \[Backport master\] Use secret defined in organization [\#1569](https://github.com/mapfish/mapfish-print/pull/1569) ([c2c-bot-gis-ci](https://github.com/c2c-bot-gis-ci))
- \[Backport master\] Add Clean docker hub tags workflow [\#1568](https://github.com/mapfish/mapfish-print/pull/1568) ([c2c-bot-gis-ci](https://github.com/c2c-bot-gis-ci))
- Merge 3.26 in master [\#1558](https://github.com/mapfish/mapfish-print/pull/1558) ([gberaudo](https://github.com/gberaudo))
- Add font Awesome [\#1542](https://github.com/mapfish/mapfish-print/pull/1542) ([sbrunner](https://github.com/sbrunner))
Expand Down Expand Up @@ -626,7 +626,7 @@
- Add missing authentication to clean docker hub tags [\#1154](https://github.com/mapfish/mapfish-print/pull/1154) ([sbrunner](https://github.com/sbrunner))
- Add missing authentication to clean docker hub tags [\#1153](https://github.com/mapfish/mapfish-print/pull/1153) ([sbrunner](https://github.com/sbrunner))
- Clean Docker hub tags [\#1152](https://github.com/mapfish/mapfish-print/pull/1152) ([sbrunner](https://github.com/sbrunner))
- Moved to Camptocamp organisation [\#1151](https://github.com/mapfish/mapfish-print/pull/1151) ([sbrunner](https://github.com/sbrunner))
- Moved to Camptocamp organization [\#1151](https://github.com/mapfish/mapfish-print/pull/1151) ([sbrunner](https://github.com/sbrunner))
- \[Backport master\] Fix the build [\#1150](https://github.com/mapfish/mapfish-print/pull/1150) ([github-actions[bot]](https://github.com/apps/github-actions))
- Use GitHub actions [\#1126](https://github.com/mapfish/mapfish-print/pull/1126) ([sbrunner](https://github.com/sbrunner))

Expand Down
4 changes: 2 additions & 2 deletions core/docker/usr/local/tomcat/conf/logback-access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bytes":"#asLong{%bytesSent}",
"total_service_time":"#asLong{%elapsedTime}",
"request":"http://%header{Host}%requestURI",
"referrer":"%header{Referer}",
"referrer":"%header{Referrer}",
"agent":"%header{User-agent}",

"request.host":"%header{Host}",
Expand Down Expand Up @@ -56,7 +56,7 @@
"bytes":"#asLong{%bytesSent}",
"total_service_time":"#asLong{%elapsedTime}",
"request":"http://%header{Host}%requestURI",
"referrer":"%header{Referer}",
"referrer":"%header{Referrer}",
"agent":"%header{User-agent}",

"request.host":"%header{Host}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class ScalebarAttributeValues {
* </ul>
*
* <p>If the value is too big or too small, the module will switch to one of the unit in parenthesis
* (the same unit is used for every interval). If this behaviour is not desired, the `lockUnits`
* (the same unit is used for every interval). If this behavior is not desired, the `lockUnits`
* parameter will force the declared unit (or map unit if no unit is declared) to be used for the
* scalebar.</p>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static class PagingProcessorValues {
* Indicates how to render the area of interest on this sub-map. This makes it easier to how the all
* the sub-maps fit together to for the complete map. Also if the map is rendered as a whole in one
* part of the report one can easily see where in the complete map the sub-map fits, even without
* looking at the labelling.
* looking at the labeling.
* <p>
* For options see: {@link org.mapfish.print.attribute.map.AreaOfInterest.AoiDisplay}
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,24 +674,24 @@ public final void setResourceBundle(final String resourceBundle) {
}

/**
* @return the list of referer checks (null = no check)
* @return the list of referrer checks (null = no check)
*/
public final UriMatchers getAllowedReferersImpl() {
return this.allowedReferers;
}

/**
* The matchers used to authorize the incoming requests in function of the referer. For example:
* The matchers used to authorize the incoming requests in function of the referrer. For example:
* <pre><code>
* allowedReferers:
* - !hostnameMatch
* host: example.com
* allowSubDomains: true
* </code></pre>
* <p>
* By default, the referer is not checked
* By default, the referrer is not checked
*
* @param matchers the list of matcher to use to check if a referer is permitted or null for no
* @param matchers the list of matcher to use to check if a referrer is permitted or null for no
* check
* @see org.mapfish.print.processor.http.matcher.URIMatcher
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
* <li><strong>haloRadius</strong> (ECQL) - (text) the radius of the halo around the text</li>
* <li>
* <strong>label</strong> (ECQL) - (text) the expression used to create the label e. See the
* section on labelling for more details
* section on labeling for more details
* </li>
* <li>
* <strong>labelAlign</strong> - (Point Placement) the indicator of how to align the text with
Expand Down Expand Up @@ -353,9 +353,9 @@
* line the label should be drawn.</li>
* </ul>
*
* <h2 id="labels">Labelling: <a class="headerlink" href="#labels">¶</a></h2>
* <h2 id="labels">Labeling: <a class="headerlink" href="#labels">¶</a></h2>
* <p>
* Labelling in this style format is done by defining a text symbolizer ("type": "text"). All text
* Labeling in this style format is done by defining a text symbolizer ("type": "text"). All text
* symbolizers consist of:
* </p>
* <ul>
Expand Down Expand Up @@ -448,7 +448,7 @@
* geometry to allow drawing the label. Works only on polygons.
* </li>
* <li><strong>group</strong> (false): If true, geometries with the same labels are grouped and considered
* a single entity to be labelled. This allows to avoid or control repeated labels.
* a single entity to be labeled. This allows to avoid or control repeated labels.
* </li>
* <li><strong>maxDisplacement</strong> (400): The distance, in pixel, a label can be displaced from its
* natural position in an attempt to find a position that does not conflict with already drawn labels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void checkAllGroupsSatisfied(final String currentPath) {
}

Assert.equals(0, errors.length(),
"\nErrors were detected when analysing the @OneOf dependencies of '" + currentPath +
"\nErrors were detected when analyzing the @OneOf dependencies of '" + currentPath +
"': \n" + errors);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void checkAllRequirementsSatisfied(final String currentPath) {
}
}
Assert.equals(0, errors.length(),
"\nErrors were detected when analysing the @Requires dependencies of '" +
"\nErrors were detected when analyzing the @Requires dependencies of '" +
currentPath + "': " + errors);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public interface Processor<IN, OUT> extends ConfigurationObject {
interface ExecutionContext {

/**
* Throws a CancellationException if the job was cancelled.
* Throws a CancellationException if the job was canceled.
*/
void stopIfCanceled();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public class MapPrinterServlet extends BaseMapServlet {
* <li>waiting</li>
* <li>running</li>
* <li>finished</li>
* <li>cancelled</li>
* <li>canceled</li>
* <li>error</li>
* </ul>
* Part of the {@link #getStatus(String, javax.servlet.http.HttpServletRequest,
Expand Down Expand Up @@ -751,7 +751,7 @@ public final void getCapabilities(
try {
printer = this.printerFactory.create(appId);
if (!checkReferer(request, printer)) {
error(capabilitiesResponse, "Invalid referer", HttpStatus.FORBIDDEN);
error(capabilitiesResponse, "Invalid referrer", HttpStatus.FORBIDDEN);
return;
}
} catch (NoSuchAppException e) {
Expand Down Expand Up @@ -825,7 +825,7 @@ public final void getExampleRequest(
try {
final MapPrinter mapPrinter = this.printerFactory.create(appId);
if (!checkReferer(request, mapPrinter)) {
error(getExampleResponse, "Invalid referer", HttpStatus.FORBIDDEN);
error(getExampleResponse, "Invalid referrer", HttpStatus.FORBIDDEN);
return;
}
final String requestDataPrefix = "requestData";
Expand Down Expand Up @@ -1095,15 +1095,15 @@ private boolean checkReferer(
if (allowedReferers == null) {
return true;
}
String referer = request.getHeader("referer");
if (referer == null) {
referer = "http://localhost/";
String referrer = request.getHeader("referrer");
if (referrer == null) {
referrer = "http://localhost/";
}
try {
return allowedReferers.matches(new URI(referer),
return allowedReferers.matches(new URI(referrer),
HttpMethod.resolve(request.getMethod()));
} catch (SocketException | UnknownHostException | URISyntaxException | MalformedURLException e) {
LOGGER.error("Referer {} invalid", referer, e);
LOGGER.error("Referrer {} invalid", referrer, e);
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class JobTracker {
protected final Configuration configuration;

/**
* The timer to use in cas of success.
* The timer to use in case of success.
*/
protected final Timer.Context successTimer;

Expand All @@ -66,7 +66,7 @@ public long onJobSuccess(final PrintJob.PrintResult printResult) {
}

/**
* To be called when a job is cancelled.
* To be called when a job is canceled.
*/
public void onJobCancel() {
Accounting.this.metricRegistry.counter(getMetricName("cancel")).inc();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public long onJobSuccess(final PrintJob.PrintResult printResult) {
public void onJobCancel() {
super.onJobCancel();
final HibernateAccountingEntry accountingEntry = new HibernateAccountingEntry(
this.entry, PrintJobStatus.Status.CANCELLED, this.configuration);
this.entry, PrintJobStatus.Status.CANCELED, this.configuration);
insertRecord(accountingEntry);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class HibernateAccountingEntry {

@Column
@Type(type = "org.hibernate.type.TextType")
private String referer;
private String referrer;

@Column(nullable = false)
@Enumerated(EnumType.STRING)
Expand Down Expand Up @@ -98,11 +98,11 @@ public HibernateAccountingEntry(
getObject(MapPrinterServlet.JSON_ATTRIBUTES).
getObject(MapPrinterServlet.JSON_REQUEST_HEADERS).
getObject(MapPrinterServlet.JSON_REQUEST_HEADERS);
if (headers.has("referer")) {
this.referer = headers.getArray("referer").getString(0);
if (headers.has("referrer")) {
this.referrer = headers.getArray("referrer").getString(0);
}
} catch (ObjectMissingException ex) {
LOGGER.info("Cannot get the referer", ex);
LOGGER.info("Cannot get the referrer", ex);
}

try {
Expand Down Expand Up @@ -132,7 +132,7 @@ public String getAppId() {
}

public String getReferer() {
return this.referer;
return this.referrer;
}

public PrintJobStatus.Status getStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface JobQueue {
void add(PrintJobEntry jobEntry);

/**
* Mark job as canceling (if running) or cancelled (if waiting / finished).
* Mark job as canceling (if running) or canceled (if waiting / finished).
*
* @param referenceId reference id to the job that has failed.
* @param message the error message
Expand Down Expand Up @@ -112,7 +112,7 @@ public interface JobQueue {
List<? extends PrintJobStatus> start(int number);

/**
* Get the jobs that are marked as "CANCELING" and must be cancelled.
* Get the jobs that are marked as "CANCELING" and must be canceled.
*/
List<? extends PrintJobStatus> toCancel();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ enum Status {
*/
RUNNING,
/**
* The job is still running, but needs to be cancelled.
* The job is still running, but needs to be canceled.
*/
CANCELING,
/**
* The job has finished processing.
*/
FINISHED,
/**
* The job was cancelled.
* The job was canceled.
*/
CANCELLED,
CANCELED,
/**
* There was an error executing the job.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ public final synchronized void cancel(
this.registry.incrementLong(TOTAL_PRINT_TIME, status.getElapsedTime());
this.registry.incrementInt(LAST_PRINT_COUNT, 1);
}
// even if the job is already finished, we store it as "cancelled" in the registry,
// so that all subsequent status requests return "cancelled"
// even if the job is already finished, we store it as "canceled" in the registry,
// so that all subsequent status requests return "canceled"
status.setCompletionTime(System.currentTimeMillis());
status.setStatus(PrintJobStatus.Status.CANCELLED);
status.setStatus(PrintJobStatus.Status.CANCELED);
}

status.setError(message);
Expand All @@ -160,8 +160,8 @@ public final synchronized void fail(final String referenceId, final String messa
this.registry.incrementInt(LAST_PRINT_COUNT, 1);
}

// even if the job is already finished, we store it as "cancelled" in the registry,
// so that all subsequent status requests return "cancelled"
// even if the job is already finished, we store it as "canceled" in the registry,
// so that all subsequent status requests return "canceled"
status.setCompletionTime(System.currentTimeMillis());
status.setStatus(PrintJobStatus.Status.ERROR);
status.setError(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public class ThreadPoolJobManager implements JobManager {
*/
private long maxIdleTime = DEFAULT_THREAD_IDLE_TIME;
/**
* A print job is cancelled, if it is not completed after this amount of time (in seconds).
* A print job is canceled, if it is not completed after this amount of time (in seconds).
*/
private long timeout = DEFAULT_TIMEOUT_IN_SECONDS;
/**
* A print job is cancelled, if this amount of time (in seconds) has passed, without that the user checked
* A print job is canceled, if this amount of time (in seconds) has passed, without that the user checked
* the status of the job.
*/
private long abandonedTimeout = DEFAULT_ABANDONED_TIMEOUT_IN_SECONDS;
Expand Down Expand Up @@ -349,17 +349,17 @@ private void cancelJobIfRunning(final String referenceId) throws NoSuchReference
LOGGER.info("Could not cancel job {}", referenceId);
}
this.runningTasksFutures.remove(referenceId);
//now from canceling to cancelled state
this.jobQueue.cancel(referenceId, "task cancelled", true);
//now from canceling to canceled state
this.jobQueue.cancel(referenceId, "task canceled", true);
}
}
}

@Override
public final void cancel(final String referenceId) throws NoSuchReferenceException {
// check if the reference id is valid
// and set canceling / cancelled status already
this.jobQueue.cancel(referenceId, "task cancelled", false);
// and set canceling / canceled status already
this.jobQueue.cancel(referenceId, "task canceled", false);
cancelJobIfRunning(referenceId);
}

Expand Down Expand Up @@ -388,11 +388,11 @@ private void cancelOld() {
//cancel old tasks
this.jobQueue.cancelOld(TimeUnit.MILLISECONDS.convert(this.timeout, TimeUnit.SECONDS),
TimeUnit.MILLISECONDS.convert(this.abandonedTimeout, TimeUnit.SECONDS),
"task cancelled (timeout)");
"task canceled (timeout)");
}

private void pollRegistry() {
//check if anything needs to be cancelled
//check if anything needs to be canceled
for (PrintJobStatus stat: this.jobQueue.toCancel()) {
try {
cancelJobIfRunning(stat.getReferenceId());
Expand All @@ -416,12 +416,12 @@ private boolean updateRegistry() {
final SubmittedPrintJob printJob = submittedJobs.next();
if (!printJob.getReportFuture().isDone() &&
(isTimeoutExceeded(printJob) || isAbandoned(printJob))) {
LOGGER.info("Cancelling job after timeout {}", printJob.getEntry().getReferenceId());
LOGGER.info("Canceling job after timeout {}", printJob.getEntry().getReferenceId());
if (!printJob.getReportFuture().cancel(true)) {
LOGGER.info("Could not cancel job after timeout {}",
printJob.getEntry().getReferenceId());
}
// remove all cancelled tasks from the work queue (otherwise the queue comparator
// remove all canceled tasks from the work queue (otherwise the queue comparator
// might stumble on non-PrintJob entries)
this.executor.purge();
}
Expand Down Expand Up @@ -455,7 +455,7 @@ private boolean updateRegistry() {
} catch (CancellationException e) {
//cancellation occurred, set cancellation status
this.jobQueue.cancel(printJob.getEntry().getReferenceId(),
"task cancelled (timeout)", true);
"task canceled (timeout)", true);
}
notifyIfStopped();
} catch (NoSuchReferenceException e) { // shouldn't really happen
Expand Down
Loading

0 comments on commit 9a50a72

Please sign in to comment.