Skip to content

Pasting object - reference comparison instead of content comparison #3

Description

@Feeeeela

I think that comparison of objectTypes should use "equals" rather than reference comparison "==".

protected void processPasteObject(String objectName, String objectType) {
if(selectedObjectPath == null || objectType == null || objectType != selectedObjectType){
LOGGER.error("Trying to paste an object that does not exist.");
}

I would change it to:
protected void processPasteObject(String objectName, String objectType) {
if(selectedObjectPath == null || objectType == null || !objectType.equals(selectedObjectType)){

In current implementation the log would write to file even if the types were similar.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions