Comments (8)
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.
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.
Ok, I will take a look at this anyway.
from intellij-swagger.
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.
Hmm, it seems we need to replace Optional.of
to Optional.ofNullable
. @rupert654 care to contribute :) ?
from intellij-swagger.
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.
Ok great! If you have any questions I'm happy to answer.
from intellij-swagger.
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)
- Code completion in referenced files
- Property "description" not allowed (when it is $ref sibling)
- YAML Scalars in descriptions prevented Swagger UI rendering
- Compatibility with IntelliJ EAP 2021.1 HOT 15
- Warning during IDE boot HOT 4
- Plug-in not loading in IntelliJ CE 2020.3 for MacOS HOT 8
- Plugin not working with Webstorm 2021.1 HOT 4
- conflict with Rust plugin of JetBrains HOT 3
- Getting JsonReferenceInspection after updating Idea to the version 2021.1 HOT 3
- IntelliJ Inspections not working after upgrading IntelliJ IDEA to 2021.1 HOT 3
- Usage of deprecated jetbrains Api HOT 1
- Could not generate Swagger UI: java.lang.NullPointerException HOT 1
- Is this Plugin still being supported? HOT 2
- Deprecation exception `AnnotationBuilder#createAnnotation` HOT 8
- FileSystemAlreadyExistsException when opening yaml files HOT 15
- Slightly strange operation of the plug-in HOT 1
- Using the preview blocks the editor HOT 1
- java.lang.Throwable: 'AnnotationBuilder#createAnnotation' is deprecated and going to be removed soon HOT 1
- java.lang.Throwable: 'AnnotationBuilder#createAnnotation' is deprecated and going to be removed soon. Use `#create()` instead HOT 1
- URL double encoding in Chrome HOT 4
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 intellij-swagger.