This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit ccf06de245272570419037cc73d49eda0a4ed7a0 Author: Martin Desruisseaux <[email protected]> AuthorDate: Fri Aug 14 18:07:38 2026 +0200 Fix a misspelling: `StoreListener.eventOccured` renamed `eventOccurred`. This is an incompatible change which cannot be made compatible easily, because the interface is sometime used in lambda expressions. --- .../main/org/apache/sis/storage/DataStore.java | 4 ++-- .../main/org/apache/sis/storage/Resource.java | 4 ++-- .../org/apache/sis/storage/event/CascadedStoreEvent.java | 2 +- .../main/org/apache/sis/storage/event/StoreListener.java | 6 +++--- .../org/apache/sis/storage/event/StoreListeners.java | 16 ++++++++-------- .../test/org/apache/sis/storage/DataStoreTestCase.java | 4 ++-- .../org/apache/sis/storage/event/StoreListenersTest.java | 6 +++--- .../org/apache/sis/gui/coverage/TileReadListener.java | 4 ++-- .../main/org/apache/sis/gui/dataset/WindowHandler.java | 2 +- .../main/org/apache/sis/gui/internal/LogHandler.java | 2 +- .../main/org/apache/sis/gui/map/MultiCanvas.java | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/DataStore.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/DataStore.java index 42439dc92e..76538e1176 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/DataStore.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/DataStore.java @@ -463,12 +463,12 @@ public abstract class DataStore implements Resource, Localized, AutoCloseable { /** * Registers a listener to notify when the specified kind of event occurs in this data store or in a resource. - * The data store will call the {@link StoreListener#eventOccured(StoreEvent)} method when new events matching + * The data store will call the {@link StoreListener#eventOccurred(StoreEvent)} method when new events matching * the {@code eventType} occur. An event may be a change in data store content or structure, or a warning that * occurred during a read or write operation. * * <p>Registering a listener for a given {@code eventType} also register the listener for all event sub-types. - * The same listener can be registered many times, but its {@link StoreListener#eventOccured(StoreEvent)} + * The same listener can be registered many times, but its {@link StoreListener#eventOccurred(StoreEvent)} * method will be invoked only once per event. This filtering applies even if the listener is registered * on individual resources of this data store.</p> * diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/Resource.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/Resource.java index eadb094c11..9499d8657a 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/Resource.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/Resource.java @@ -346,12 +346,12 @@ public interface Resource { /** * Registers a listener to notify when the specified kind of event occurs in this resource or in children. - * The resource will call the {@link StoreListener#eventOccured(StoreEvent)} method when new events matching + * The resource will call the {@link StoreListener#eventOccurred(StoreEvent)} method when new events matching * the {@code eventType} occur. An event may be a change in resource content or structure, or a warning that * occurred during a read or write operation. * * <p>Registering a listener for a given {@code eventType} also register the listener for all event sub-types. - * The same listener can be registered many times, but its {@link StoreListener#eventOccured(StoreEvent)} + * The same listener can be registered many times, but its {@link StoreListener#eventOccurred(StoreEvent)} * method will be invoked only once per event. This filtering applies even if the listener is registered * on different resources in the same tree, for example a parent and its children.</p> * diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/CascadedStoreEvent.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/CascadedStoreEvent.java index e47b7fffe1..2b3cd79729 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/CascadedStoreEvent.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/CascadedStoreEvent.java @@ -114,7 +114,7 @@ public abstract class CascadedStoreEvent<E extends CascadedStoreEvent<E>> extend * Invoked when an event is fired on a parent resource. * This method causes similar event to be fired on children resources. */ - @Override public void eventOccured(final E event) { + @Override public void eventOccurred(final E event) { final StoreListeners r = listeners.get(); if (r == null) { parent.removeListener(eventType, this); diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListener.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListener.java index 1e2e77a5c6..abd38d0df2 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListener.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListener.java @@ -23,7 +23,7 @@ import org.apache.sis.storage.Resource; /** * An object which listens for events (typically changes or warnings) occurring in a resource * or one of its children. The kind of event is defined by the subclass of the {@link StoreEvent} - * instance given to the {@link #eventOccured(StoreEvent)} method. For example if a warning occurred + * instance given to the {@link #eventOccurred(StoreEvent)} method. For example if a warning occurred * while reading data from a file, then the event will be an instance of {@link WarningEvent}. * * <p>{@link Resource} implementations are responsible for instantiating the most specific @@ -33,7 +33,7 @@ import org.apache.sis.storage.Resource; * Each listener is notified only once per event even if the listener is registered twice.</p> * * @author Johann Sorel (Geomatys) - * @version 1.0 + * @version 1.7 * * @param <E> the type of events of interest to this listener. * @@ -51,5 +51,5 @@ public interface StoreListener<E extends StoreEvent> extends EventListener { * * @param event description of the change or warning that occurred in a resource. Shall not be {@code null}. */ - void eventOccured(E event); + void eventOccurred(E event); } diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListeners.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListeners.java index 81ee54b571..d3cf48565e 100644 --- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListeners.java +++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/event/StoreListeners.java @@ -248,7 +248,7 @@ public class StoreListeners implements Localized { * @return the {@code done} map, created when first needed. * @throws ExecutionException if at least one listener failed to execute. */ - final Map<StoreListener<?>,Boolean> eventOccured(final E event, Map<StoreListener<?>,Boolean> done) + final Map<StoreListener<?>,Boolean> eventOccurred(final E event, Map<StoreListener<?>,Boolean> done) throws ExecutionException { RuntimeException error = null; @@ -260,7 +260,7 @@ public class StoreListeners implements Localized { for (final StoreListener<? super E> listener : list) { if (event.isConsumed()) break; if (done.put(listener, Boolean.TRUE) == null) try { - listener.eventOccured(event); + listener.eventOccurred(event); } catch (RuntimeException ex) { if (error == null) error = ex; else error.addSuppressed(ex); @@ -547,7 +547,7 @@ public class StoreListeners implements Localized { * the given record to one of the following destinations, in preference order: * * <ol> - * <li><code>{@linkplain StoreListener#eventOccured StoreListener.eventOccured}(new + * <li><code>{@link StoreListener#eventOccurred StoreListener.eventOccurred}(new * {@linkplain WarningEvent}(source, record))</code> on all listeners registered for this kind of event.</li> * <li><code>{@linkplain Filter#isLoggable(LogRecord) onUnhandled.isLoggable(description)}</code> * if above step found no listener and the {@code onUnhandled} filter is non-null.</li> @@ -610,7 +610,7 @@ public class StoreListeners implements Localized { * notifies listeners registered in parent {@code StoreListeners}s. Each listener will be * notified only once even if it has been registered many times. * - * <p>If one or many {@link StoreListener#eventOccured(StoreEvent)} implemetations throw a + * <p>If one or many {@link StoreListener#eventOccurred(StoreEvent)} implemetations throw a * {@link RuntimeException}, those exceptions will be collected and reported in a single * {@linkplain Logging#unexpectedException(Logger, Class, String, Throwable) log record}. * Runtime exceptions in listeners do not cause this method to fail.</p> @@ -653,7 +653,7 @@ public class StoreListeners implements Localized { * @param eventType the type of the event to be fired. * @param event the event to fire. * @return {@code true} if the event has been sent to at least one listener. - * @throws ExecutionException if an exception is thrown inside {@link StoreListener#eventOccured(StoreEvent)}. + * @throws ExecutionException if an exception is thrown inside {@link StoreListener#eventOccurred(StoreEvent)}. * All other listeners continue to receive the event before {@code ExecutionException} is thrown. */ @SuppressWarnings("unchecked") @@ -665,7 +665,7 @@ public class StoreListeners implements Localized { do { for (ForType<?> e = m.listeners; e != null; e = e.next) { if (e.type.isAssignableFrom(eventType)) try { - done = ((ForType<? super E>) e).eventOccured(event, done); + done = ((ForType<? super E>) e).eventOccurred(event, done); } catch (ExecutionException ex) { if (error == null) error = ex; else error.getCause().addSuppressed(ex.getCause()); @@ -712,7 +712,7 @@ public class StoreListeners implements Localized { /** * Registers a listener to notify when the specified kind of event occurs. * Registering a listener for a given {@code eventType} also register the listener for all event sub-types. - * The same listener can be registered many times, but its {@link StoreListener#eventOccured(StoreEvent)} + * The same listener can be registered many times, but its {@link StoreListener#eventOccurred(StoreEvent)} * method will be invoked only once per event. This filtering applies even if the listener is registered * on different resources in the same tree, for example a parent and its children. * @@ -936,7 +936,7 @@ public class StoreListeners implements Localized { * Because listeners are discarded, invoking this method many times * on the same instance has no effect after the first invocation. * - * <p>If one or many {@link StoreListener#eventOccured(StoreEvent)} implementations throw + * <p>If one or many {@link StoreListener#eventOccurred(StoreEvent)} implementations throw * a {@link RuntimeException}, those exceptions will be collected and reported in a single * {@linkplain Logging#unexpectedException(Logger, Class, String, Throwable) log record}. * Runtime exceptions in listeners do not cause this method to fail.</p> diff --git a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/DataStoreTestCase.java b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/DataStoreTestCase.java index b6340636f6..8bbd300c0a 100644 --- a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/DataStoreTestCase.java +++ b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/DataStoreTestCase.java @@ -46,7 +46,7 @@ public abstract class DataStoreTestCase extends TestCaseWithLogs implements Stor /** * Performs an unconditional redirection of the warnings emitted by the given store to the JUnit extension. - * The {@link #eventOccured(WarningEvent)} method will be invoked for each warning. + * The {@link #eventOccurred(WarningEvent)} method will be invoked for each warning. * * @param store the data store to listen to. */ @@ -61,7 +61,7 @@ public abstract class DataStoreTestCase extends TestCaseWithLogs implements Stor * @param event the warning emitted by the data store. */ @Override - public final void eventOccured(WarningEvent event) { + public final void eventOccurred(WarningEvent event) { loggings.accept(event.getDescription()); } } diff --git a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/event/StoreListenersTest.java b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/event/StoreListenersTest.java index cde594da00..5b2b4f0baa 100644 --- a/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/event/StoreListenersTest.java +++ b/endorsed/src/org.apache.sis.storage/test/org/apache/sis/storage/event/StoreListenersTest.java @@ -40,7 +40,7 @@ public final class StoreListenersTest extends TestCase implements StoreListener< private final DataStoreMock store; /** - * The warning received by {@link #eventOccured(WarningEvent)}. + * The warning received by {@link #eventOccurred(WarningEvent)}. * This is stored for allowing test methods to verify the properties. */ private LogRecord warning; @@ -59,7 +59,7 @@ public final class StoreListenersTest extends TestCase implements StoreListener< * @param warning the warning event emitted by the data store. */ @Override - public void eventOccured(final WarningEvent warning) { + public void eventOccurred(final WarningEvent warning) { assertSame(store, warning.getSource()); this.warning = warning.getDescription(); } @@ -140,7 +140,7 @@ public final class StoreListenersTest extends TestCase implements StoreListener< class Listener implements StoreListener<CloseEvent> { /** Whether the resource has been closed. */boolean isClosed; - @Override public void eventOccured(CloseEvent event) { + @Override public void eventOccurred(CloseEvent event) { assertSame(resource, event.getSource()); assertFalse(isClosed); isClosed = true; diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/TileReadListener.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/TileReadListener.java index 0160ed6656..b396311668 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/TileReadListener.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/TileReadListener.java @@ -143,7 +143,7 @@ final class TileReadListener implements StoreListener<TileReadEvent>, EventHandl */ @Override @SuppressWarnings("UseSpecificCatch") - public void eventOccured(final TileReadEvent event) { + public void eventOccurred(final TileReadEvent event) { final boolean pending = childrenUpdateRequested; childrenUpdateRequested = true; BackgroundThreads.EXECUTOR.execute(() -> { @@ -185,7 +185,7 @@ final class TileReadListener implements StoreListener<TileReadEvent>, EventHandl transition.setOnFinished(this); tileShapes.add(transition); } catch (Exception e) { - Logging.recoverableException(LOGGER, TileReadListener.class, "eventOccured", e); + Logging.recoverableException(LOGGER, TileReadListener.class, "eventOccurred", e); } /* * The addition of the tiles in the scene graph needs to be done in the JavaFX thread. diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java index dd25beaa61..005bad2dd1 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java @@ -263,7 +263,7 @@ public abstract class WindowHandler { * this method will block until the JavaFX thread finished to close all windows, for avoiding that * the background thread closes the resource before we removed all usages in JavaFX thread. */ - @Override public void eventOccured(final CloseEvent event) { + @Override public void eventOccurred(final CloseEvent event) { final Resource resource = event.getSource(); if (Platform.isFxApplicationThread()) { close(resource); diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/LogHandler.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/LogHandler.java index 4925812218..c71d4628c8 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/LogHandler.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/LogHandler.java @@ -334,7 +334,7 @@ public final class LogHandler extends Handler implements StoreListener<WarningEv * @param event the warning event. */ @Override - public void eventOccured(final WarningEvent event) { + public void eventOccurred(final WarningEvent event) { final Resource source = event.getSource(); if (source != null) { final LogRecord log = event.getDescription(); diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MultiCanvas.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MultiCanvas.java index eb56df9176..034904dc10 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MultiCanvas.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/MultiCanvas.java @@ -796,7 +796,7 @@ final class MultiCanvas extends Widget implements Observable { * This method blocks until the JavaFX thread finished to execute {@code removeResource(…)} * for avoiding that the background thread closes the resource before we removed its usages. */ - @Override public void eventOccured(final CloseEvent event) { + @Override public void eventOccurred(final CloseEvent event) { final Resource resource = event.getSource(); if (Platform.isFxApplicationThread()) { removeResource(resource);
