Skip to content

org.openrewrite.staticanalysis.UseObjectNotifyAll rewrites all notifymethods #580

@koppor

Description

@koppor

We have an interface offering notify. OpenRewrite changes the calls to notifyAll. However, this method does not exist.

diff --git a/jabgui/src/main/java/org/jabref/gui/frame/SendAsEMailAction.java b/jabgui/src/main/java/org/jabref/gui/frame/SendAsEMailAction.java
index f459878e40..db8b796206 100644
--- a/jabgui/src/main/java/org/jabref/gui/frame/SendAsEMailAction.java
+++ b/jabgui/src/main/java/org/jabref/gui/frame/SendAsEMailAction.java
@@ -60,7 +60,7 @@ public abstract class SendAsEMailAction extends SimpleCommand {
                       .onFailure(e -> {
                           String message = Localization.lang("Error creating email");
                           LOGGER.warn(message, e);
-                          dialogService.notify(message);
+                          dialogService.notifyAll(message);
                       })
                       .executeWith(taskExecutor);
     }

Our interface: https://github.com/JabRef/jabref/blob/main/jablib/src/main/java/org/jabref/logic/util/NotificationService.java

Expected: No change by org.openrewrite.staticanalysis.UseObjectNotifyAll if notify method is not from java.lang.Object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions