Comments (4)
Пример можно?
Попробовал сериализовать-десериализовать простой класс с полем ReentrantLock - всё получилось.
from one-nio.
Вот такой тест (извиняюсь что на Котлине):
class TestBlockingQueue(
private val capacity: Long,
private val ttl: Long
): Serializable {
private val tasksQueue = HashMap<String, Serializable>()
private val tasksLock = ReentrantLock()
private val tasksFullCondition = tasksLock.newCondition()
//.... методы
}
class TestBlockingQueueTest {
@Test
fun testShouldSerialize() {
val queue = TestBlockingQueue(100, 100)
val buf = ByteArray(57)
val out = SerializeStream(buf)
out.writeObject(queue)
assertEquals(out.count(), 57)
val stream = DeserializeStream(buf)
val queueTest = stream.readObject() as TestBlockingQueue
assertNotNull(queueTest)
}
}
выкидывает Exception:
> AccessError: tried to access class java.util.concurrent.locks.ReentrantLock$Sync from class sun.reflect.Delegate1_ReentrantLock
>
> at sun.reflect.Delegate1_ReentrantLock.read(Unknown Source)
from one-nio.
Не воспроизводится.
Какая JDK?
from one-nio.
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/bin/java
Наверно можно закрыть. Побробую поглубже изучить. Если что вернусь
from one-nio.
Related Issues (20)
- Ignore Content-Length when using chunked transfer encoding HOT 1
- SharedMaps: how use correctly HOT 1
- HttpClient extra whitespace break Transfer-Encoding chunked header HOT 7
- Utf-8 support for 4 byte chars HOT 2
- JDK16 SelectableJavaSocket illegal reflective access HOT 2
- Java 17 is supported HOT 3
- Вэб-сокеты HOT 1
- java.time bug HOT 2
- java.util.Locale support HOT 2
- BigInteger problem HOT 2
- quic and http3 plans HOT 6
- BigDecimal with new Java does not work any more HOT 4
- json skip serialize default primitive values HOT 2
- json deserialization numbers to string HOT 1
- Unable to connect to https://api.kucoin.com due to javax.net.ssl.SSLException: error:0A000410:SSL routines::sslv3 alert handshake failure
- one-nio version >=1.6.1 doesn't work with glibc 2.31 HOT 1
- reactive-streams HOT 1
- ClassNotFoundException is not serializable for Adoptium jdk 17 HOT 1
- how to get a user's ip on a server using RPC? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from one-nio.