GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bean with getter returning Stream is treating the Stream as an alternative setter · Issue #3462 · mapstruct/mapstruct

Bean with getter returning Stream is treating the Stream as an alternative setter #3462

New issue
Copy link
New issue
Copy link
Closed
#3488
Closed
Bean with getter returning Stream is treating the Stream as an alternative setter#3462
#3488
Copy link
Assignees
filiphr
Labels
bug
Milestone
1.6.0.Beta2

Description

@filiphr
filiphr
opened on Dec 3, 2023
Issue body actions

Expected behavior

A getter returning a Stream should not be treated as an alternative setter

Actual behavior

The getter is treated as an alternative setter

Steps to reproduce the problem

public static class Foo {
    List<String> values;
    public List<String> getValues() { return values; }
    public void setValues(List<String> values) { this.values = values; }
}

public static class Bar {
    List<String> values;

    public List<String> getValues() { return this.values; }
    public void setValues(List<String> values) { this.values = values; }

    // This is the root of the problem; try replacing with any non-collection type.
    public Stream<String> getX() {
        throw new UnsupportedOperationException();
    }
}

@Mapper
public interface BarMapper {
    @Mapping(target = "values", source = "values")
    Bar toBar(Foo foo);
}

From #3425

MapStruct Version

1.5.5.Final / 1.6.0.Beta1

Activity

  1. filiphr
    added
    bug
    on Dec 3, 2023
  2. filiphr
    added this to the 1.6.0.Beta2 milestone on Dec 3, 2023
  3. filiphr
    self-assigned this
    on Dec 27, 2023
  4. filiphr
    added a commit that references this issue on Dec 27, 2023

    mapstruct#3462 Stream getters should not be treated as alternative se…

    0099498
  5. filiphr commented on Dec 27, 2023

    @filiphr
    filiphr
    on Dec 27, 2023
    MemberAuthor
    More actions

    This was actually caused by #1561

  6. filiphr
    closed this as completedin #3488on Dec 31, 2023
  7. filiphr
    added a commit that references this issue on Dec 31, 2023

    #3462 Stream getters should not be treated as alternative setter

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

Metadata

Metadata

Assignees

  • @filiphr
    filiphr

Labels

bug

Type

No type

Projects

No projects

    Milestone

    • 1.6.0.Beta2

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.