Giter Site home page Giter Site logo

mirrorCache内存泄露 about nutz HOT 5 OPEN

xltanglx avatar xltanglx commented on May 18, 2024
mirrorCache内存泄露

from nutz.

Comments (5)

wendal avatar wendal commented on May 18, 2024

java.lang.ClassCastException ? 给一下日志或者重现代码

from nutz.

xltanglx avatar xltanglx commented on May 18, 2024

首先感谢您的回复,以下是一个简单的复现代码,当NutConf.USE_MIRROR_CACHE=true时无问题,但是NutConf.USE_MIRROR_CACHE=false时,最后一行出现类型转换异常。
NutConf.USE_MIRROR_CACHE = false; String jsonStr = "{\"groupName\":\"终极一班\",\"students\":[{\"name\":\"张三\",\"age\":15},{\"name\":\"李四\",\"age\":15}]}"; Group group = Json.fromJson(Group.class, jsonStr); List<Student> students = group.getStudents(); Student student = Lang.first(students);

from nutz.

xltanglx avatar xltanglx commented on May 18, 2024

Nutz似乎识别不出来List放的是Student,而是把它当做一个LinkedHashMap,所以出现java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to Student

from nutz.

wendal avatar wendal commented on May 18, 2024

哦, json报错, 这个没想到

from nutz.

xltanglx avatar xltanglx commented on May 18, 2024

请问Nutz会修复这个漏洞吗?如果没有修复,可能mirrorCache带来的内存泄露没有办法解决。除此之外,想问一下,为什么关闭mirrorCache会影响到Json的序列化,关闭mirrorCache还会影响到其他工具吗?

from nutz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.