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
jma-9code opened this issue Dec 28, 2016 · 3 comments
Closed

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

jma-9code opened this issue Dec 28, 2016 · 3 comments
Labels
Milestone

Comments

@jma-9code
Copy link

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

slemesle commented Jan 3, 2017

This is fixed in snapshot build

@jma-9code
Copy link
Author

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

@slemesle
Copy link

slemesle commented Jan 4, 2017

yes, you miss the push :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants