Changeset 35665 in osm for applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/gnome/GnomeKeyringLibrary.java
- Timestamp:
- 2020-12-07T18:10:16+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/native-password-manager/src/org/netbeans/modules/keyring/gnome/GnomeKeyringLibrary.java
r34504 r35665 43 43 package org.netbeans.modules.keyring.gnome; 44 44 45 import com.sun.jna.DefaultTypeMapper; 45 import com.sun.jna.DefaultTypeMapper; // NOSONAR 46 46 import com.sun.jna.FromNativeContext; 47 47 import com.sun.jna.Library; … … 68 68 // http://packages.ubuntu.com/search?suite=precise&arch=any&mode=exactfilename&searchon=contents&keywords=libgnome-keyring.so.0 69 69 private static final String EXPLICIT_ONEIRIC = "/usr/lib/libgnome-keyring.so.0"; 70 private static Objectload(Map<String,?> options) {70 private static GnomeKeyringLibrary load(Map<String,?> options) { 71 71 try { 72 return Native.load Library(GENERIC, GnomeKeyringLibrary.class, options);72 return Native.load(GENERIC, GnomeKeyringLibrary.class, options); 73 73 } catch (UnsatisfiedLinkError x) { 74 74 // #203735: on Oneiric, may have trouble finding right lib. … … 76 76 // Unclear if this workaround is still needed for Oneiric with 3.4, but seems harmless to leave it in for now. 77 77 if (new File(EXPLICIT_ONEIRIC).isFile()) { 78 return Native.load Library(EXPLICIT_ONEIRIC, GnomeKeyringLibrary.class, options);78 return Native.load(EXPLICIT_ONEIRIC, GnomeKeyringLibrary.class, options); 79 79 } else { 80 80 throw x; … … 85 85 } 86 86 87 GnomeKeyringLibrary LIBRARY = (GnomeKeyringLibrary)LibFinder.load(Collections.singletonMap(OPTION_TYPE_MAPPER, new DefaultTypeMapper() {87 GnomeKeyringLibrary LIBRARY = LibFinder.load(Collections.singletonMap(OPTION_TYPE_MAPPER, new DefaultTypeMapper() { 88 88 { 89 89 addTypeConverter(Boolean.TYPE, new TypeConverter() { // #198921 … … 107 107 108 108 // GnomeKeyringAttributeList gnome_keyring_attribute_list_new() = g_array_new(FALSE, FALSE, sizeof(GnomeKeyringAttribute)) 109 int GnomeKeyringAttribute_SIZE = Pointer.SIZE * 3; // conservatively: 2 pointers + 1 enum109 int GnomeKeyringAttribute_SIZE = Native.POINTER_SIZE * 3; // conservatively: 2 pointers + 1 enum 110 110 111 111 void gnome_keyring_attribute_list_append_string( … … 146 146 @Override 147 147 protected List<String> getFieldOrder() { 148 return Arrays.asList( new String[] {148 return Arrays.asList( 149 149 "keyring", 150 150 "item_id", 151 151 "attributes", 152 "secret" ,153 });152 "secret" 153 ); 154 154 } 155 155 }
Note:
See TracChangeset
for help on using the changeset viewer.