Skip to content

[JAVASPRING] equals and hashCode for models with byte[] and binary strings #11179

Description

@mslone
Description

The generated equals and hashcode methods for models with byte[] and binary strings use wrong methods. This was fixed for Java in #7341 but the bug remains when generating with -l spring

Swagger-codegen version

2.4.21

Command line used for generation

java -jar swagger-codegen-cli-2.4.21.jar generate -i swagger.json -l spring -DdateLibrary=legacy,hideGenerationTimestamp=true --model-package com.swagger.codegen.swagger.bean -o output

Related issues/PRs

#7341

Suggest a fix/enhancement

The same fix from 7341 should work if applied to modules/swagger-codegen/src/main/resources/JavaSpring/model.mustache, modules/swagger-codegen/src/main/resources/Java/pojo.mustache, and the script is run to update samples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions