Code Monkey home page Code Monkey logo

Comments (8)

semonte avatar semonte commented on May 12, 2024

Thanks for the report. Unfortunately I wasn't able to reproduce this, I tested with Swagger Plugin version 0.0.20.

What version are you using? Does the exception from just opening the file?

from intellij-swagger.

bdaroz avatar bdaroz commented on May 12, 2024

The plugin is 0.0.20. It doesn't seem to trigger on load, but it does trigger quite a few times (my last editing session had 6 triggers between start and clear of the error). Either way, a decision was made to refactor to a JSON model instead of YAML (for other reasons) so the problem hasn't reoccurred.

from intellij-swagger.

semonte avatar semonte commented on May 12, 2024

Ok, I will take a look at this anyway.

from intellij-swagger.

rupert-madden-abbott avatar rupert-madden-abbott commented on May 12, 2024

I've got the same error with 0.0.21 which is the latest version that installs in IntelliJ. The stack trace is the same, however.

It happens very intermittently. I would assume it is probably a race condition on this line. I'm guessing that isPresent returns true but the key text has been deleted by the time getKeyText is called.

from intellij-swagger.

semonte avatar semonte commented on May 12, 2024

Hmm, it seems we need to replace Optional.of to Optional.ofNullable. @rupert654 care to contribute :) ?

from intellij-swagger.

rupert-madden-abbott avatar rupert-madden-abbott commented on May 12, 2024

I thought that initially too, but then I felt like I may have misunderstood what the line is doing. Let me take another look.

from intellij-swagger.

semonte avatar semonte commented on May 12, 2024

Ok great! If you have any questions I'm happy to answer.

from intellij-swagger.

rupert-madden-abbott avatar rupert-madden-abbott commented on May 12, 2024

I'm not very familiar with this functional style since I'm normally stuck on Java 5/6 but I believe that should fix the problem whilst maintaining the intended behaviour of the method.

from intellij-swagger.

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.