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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Jan 3, 2017

This is fixed in snapshot build

slemesle commented Jan 3, 2017

This is fixed in snapshot build

@jmarginier

This comment has been minimized.

Show comment
Hide comment
@jmarginier

jmarginier Jan 4, 2017

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

jmarginier commented Jan 4, 2017

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

@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Jan 4, 2017

yes, you miss the push :)

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