Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert byte[] to byte[] or char[] to char[] #133

Closed
jmarginier opened this issue Dec 28, 2016 · 3 comments
Closed

Convert byte[] to byte[] or char[] to char[] #133

jmarginier opened this issue Dec 28, 2016 · 3 comments
Labels
bug
Milestone

Comments

@jmarginier
Copy link

@jmarginier jmarginier commented Dec 28, 2016

When i use mapper to convert this class :

public class SecureKeyStore {
...
    private byte[] keyStore;
...
    public byte[] getKeyStore() {
        return keyStore;
    }

    public void setKeyStore(byte[] keyStore) {
        this.keyStore = keyStore;
    }
}

to :

public class SecureKeyStoreDTO {

    public byte[] keyStore;
.....
    public byte[] getKeyStore() {
        return keyStore;
    }

    public void setKeyStore(byte[] keyStore) {
        this.keyStore = keyStore;
    }
}

with this mapper :

@Mapper(withIgnoreMissing = IgnoreMissing.ALL)
public interface SecureKeyStoreMapper {
    SecureKeyStoreDTO asDTO(SecureKeyStore source);

    SecureKeyStore as(SecureKeyStoreDTO in, SecureKeyStore out);
}

The generated mapper is :
System.arraycopy(in.getKeyStore(), 0, out.setKeyStore, 0, in.getKeyStore().length);

So he can't work ! It's the same with char[]

Thx

@slemesle slemesle added the bug label Jan 3, 2017
@slemesle slemesle added this to the 1.0 Final milestone Jan 3, 2017
@slemesle
Copy link
Collaborator

@slemesle slemesle commented Jan 3, 2017

This is fixed in snapshot build

@jmarginier
Copy link
Author

@jmarginier jmarginier commented Jan 4, 2017

0.16-SNAPSHOT doesn't fix this error...or I miss something :)

slemesle added a commit that referenced this issue Jan 4, 2017
@slemesle
Copy link
Collaborator

@slemesle slemesle commented Jan 4, 2017

yes, you miss the push :)

@slemesle slemesle closed this Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.