Giter Site home page Giter Site logo

Comments (6)

filiphr avatar filiphr commented on July 18, 2024

The newest MapStruct is now 1.3.0.Final 😉. In any case that warning is shown when you are using @Mapping in a class or interface. Can you please give me an example of your decorator so I can have a better look?

from mapstruct-idea.

jordilaforge avatar jordilaforge commented on July 18, 2024

ok I have updated to the final version of mapstruct thanks. But the compiler Warning still persists. I have taken the lombok mapstruct example from github to reproduce the compiler error (https://github.com/mapstruct/mapstruct-examples/tree/master/mapstruct-lombok)
ok this is the mapper Inteface:

@Mapper
@DecoratedWith(ConverterDecorator.class)
public interface Converter {

    Converter INSTANCE = Mappers.getMapper(Converter.class);

    @Mapping(source = "test1",target = "test2")
    Model fromDto(Dto dto);

    @Mapping(source = "test2",target = "test1")
    Dto toDto(Model model);
}

And this the ConverterDecorator:

public abstract class ConverterDecorator implements Converter {

    private final Converter delegate;

    public ConverterDecorator(Converter delegate){
        this.delegate = delegate;
    };

    @Override
    public Model fromDto(Dto dto) {
        //do something before or after mapping
        return delegate.fromDto(dto);
    }

    @Override
    public Dto toDto(Model model) {
        //do something before or after mapping
        return delegate.toDto(model);
    }
}

With the plugin installed the ConverterDecorator class has a red underline saying "@Mapper or @MapperConfig annotation is missing"

I use the latest IntelliJ 2018.3.4

from mapstruct-idea.

filiphr avatar filiphr commented on July 18, 2024

I see the problem now. Thanks for reporting the problem. I am going to have a look at it and fix it, this is clearly a bug.

from mapstruct-idea.

filiphr avatar filiphr commented on July 18, 2024

This has been fixed on master. Thanks for the reproducer @jordilaforge

from mapstruct-idea.

jearton avatar jearton commented on July 18, 2024

I have the same problem. When to release?

from mapstruct-idea.

filiphr avatar filiphr commented on July 18, 2024

This was released on 16th of June as part of the 1.1.1 release

from mapstruct-idea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.