Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
jna.28016
jna-java8compat.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jna-java8compat.patch of Package jna.28016
diff -urEbwB jna-5.4.0/build.xml jna-5.4.0.new/build.xml --- jna-5.4.0/build.xml 2019-07-19 21:22:03.000000000 +0200 +++ jna-5.4.0.new/build.xml 2019-10-10 21:47:22.950356404 +0200 @@ -102,7 +102,12 @@ files. --> <condition property="compatibility" value="1.6" else="9"> + <or> <matches pattern="^1\.\d+$" string="${ant.java.version}"/> + <matches pattern="^9.*$" string="${ant.java.version}"/> + <matches pattern="^10.*$$" string="${ant.java.version}"/> + <matches pattern="^11.*$$" string="${ant.java.version}"/> + </or> </condition> <condition property="compatibility-check" value="true"> diff -urEbwB jna-5.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java jna-5.4.0.new/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java --- jna-5.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2019-07-19 21:22:03.000000000 +0200 +++ jna-5.4.0.new/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2019-10-10 21:37:54.962613364 +0200 @@ -23,6 +23,7 @@ */ package com.sun.jna.platform.mac; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.ArrayList; @@ -102,11 +103,11 @@ bb.mark(); // first key starts from here while (bb.hasRemaining()) { if (bb.get() == 0) { - ByteBuffer nameBuffer = (ByteBuffer) bb.duplicate().limit(bb.position() - 1).reset(); + ByteBuffer nameBuffer = (ByteBuffer) ((Buffer)(bb.duplicate())).limit(bb.position() - 1).reset(); if (nameBuffer.hasRemaining()) { names.add(decodeString(nameBuffer)); } - bb.mark(); // next key starts from here + ((Buffer)bb).mark(); // next key starts from here } } diff -urEbwB jna-5.4.0/test/com/sun/jna/BufferArgumentsMarshalTest.java jna-5.4.0.new/test/com/sun/jna/BufferArgumentsMarshalTest.java --- jna-5.4.0/test/com/sun/jna/BufferArgumentsMarshalTest.java 2019-07-19 21:22:03.000000000 +0200 +++ jna-5.4.0.new/test/com/sun/jna/BufferArgumentsMarshalTest.java 2019-10-10 21:28:39.574890668 +0200 @@ -23,6 +23,7 @@ */ package com.sun.jna; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.DoubleBuffer; @@ -108,7 +109,7 @@ for (int i=0;i < buf.capacity();i++) { assertEquals("Bad value at index " + i, MAGIC, buf.get(i)); } - buf.position(512); + ((Buffer)buf).position(512); lib.fillInt8Buffer(buf, 512, (byte)0); for (int i=0;i < buf.capacity();i++) { assertEquals("Bad value at index " + i, diff -urEbwB jna-5.4.0/test/com/sun/jna/PerformanceTest.java jna-5.4.0.new/test/com/sun/jna/PerformanceTest.java --- jna-5.4.0/test/com/sun/jna/PerformanceTest.java 2019-07-19 21:22:03.000000000 +0200 +++ jna-5.4.0.new/test/com/sun/jna/PerformanceTest.java 2019-10-10 21:26:21.041920761 +0200 @@ -396,7 +396,7 @@ start = System.currentTimeMillis(); for (int i=0;i < COUNT;i++) { byte[] bytes = str.getBytes(); - b.position(0); + ((Buffer)b).position(0); b.put(bytes); b.put((byte)0); int iresult = CLibrary.strlen(b); @@ -413,7 +413,7 @@ for (int i=0;i < COUNT;i++) { b.putInt(8, (int)pb.peer + 12); b.putInt(12, (int)pb.peer + 16); - b.position(16); + ((Buffer)b).position(16); // This operation is very expensive! b.put(str.getBytes()); b.put((byte)0); @@ -454,7 +454,7 @@ start = System.currentTimeMillis(); for (int i=0;i < COUNT;i++) { - b.position(0); + ((Buffer)b).position(0); b.put(bulk); } delta = System.currentTimeMillis() - start; diff -urEbwB jna-5.4.0/test/com/sun/jna/PointerBufferTest.java jna-5.4.0.new/test/com/sun/jna/PointerBufferTest.java --- jna-5.4.0/test/com/sun/jna/PointerBufferTest.java 2019-07-19 21:22:03.000000000 +0200 +++ jna-5.4.0.new/test/com/sun/jna/PointerBufferTest.java 2019-10-10 21:21:33.152310989 +0200 @@ -24,6 +24,7 @@ package com.sun.jna; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.DoubleBuffer; @@ -42,7 +43,7 @@ final String ENCODING = "utf8"; Memory m = new Memory(1024); ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder()); - buf.put(MAGIC.getBytes(ENCODING)).put((byte) 0).flip(); + ((Buffer)(buf.put(MAGIC.getBytes(ENCODING)).put((byte) 0))).flip(); assertEquals("String not written to memory", MAGIC, m.getString(0, ENCODING)); } @@ -50,7 +51,7 @@ final byte MAGIC = (byte)0xED; Memory m = new Memory(8); ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder()); - buf.put(MAGIC).flip(); + ((Buffer)(buf.put(MAGIC))).flip(); assertEquals("Byte not written to memory", MAGIC, m.getByte(0)); } @@ -58,7 +59,7 @@ final int MAGIC = 0xABEDCF23; Memory m = new Memory(8); ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder()); - buf.putInt(MAGIC).flip(); + ((Buffer)(buf.putInt(MAGIC))).flip(); assertEquals("Int not written to memory", MAGIC, m.getInt(0)); } @@ -66,7 +67,7 @@ final long MAGIC = 0x1234567887654321L; Memory m = new Memory(8); ByteBuffer buf = m.getByteBuffer(0, m.size()).order(ByteOrder.nativeOrder()); - buf.putLong(MAGIC).flip(); + ((Buffer)(buf.putLong(MAGIC))).flip(); assertEquals("Long not written to memory", MAGIC, m.getLong(0)); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor