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

Tighten the generic bounds for Structure#newInstance #898

Commits on Dec 24, 2017

  1. Tighten the generic bounds for Structure#newInstance

    The signature was: `Structure newInstance(Class<?> type)` requiring
    an explicit cast after the call. The the new signature introduces a 
    type parameter `T` with an upper bound of `com.sun.jna.Structure`: 
    
    <T extends Structure> T newInstance(Class<T> type)`
    
    The companion, that takes an init pointer was also updated:
    
    <T extends Structure> T newInstance(Class<T> type, Pointer init)
    
    Closes: java-native-access#889
    matthiasblaesing committed Dec 24, 2017
    Configuration menu
    Copy the full SHA
    a9a2c43 View commit details
    Browse the repository at this point in the history