~ubuntu-branches/ubuntu/wily/libjna-java/wily-proposed

« back to all changes in this revision

Viewing changes to src/com/sun/jna/NativeMappedConverter.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-11-02 14:14:51 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091102141451-j5hdwzzq5zwxrp4n
* New upstream release.
* Fixed debian/repack-source.sh to correctly use mktemp.
* Make libjna-java Depends on *-headless packages.
* Moved package under pkg-java control.
* Added debian/README.source to describe quilt.
* Added myself as Uploader.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    }
67
67
 
68
68
    public Object toNative(Object value, ToNativeContext context) {
69
 
        return value == null ? defaultValue().toNative() : ((NativeMapped)value).toNative();
 
69
        if (value == null) {
 
70
            if (Pointer.class.isAssignableFrom(nativeType)) {
 
71
                return null;
 
72
            }
 
73
            value = defaultValue();
 
74
        }
 
75
        return ((NativeMapped)value).toNative();
70
76
    }
71
77
}
 
 
b'\\ No newline at end of file'