Skip to content

Pasting object - reference comparison instead of content comparison #3

@Feeeeela

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.

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