aqiu202 / RedsoftYapiUpload

一个快速生成接口文档的IntelliJ IDEA的Yapi上传小插件,如果给你带来了方便,请给个Star 谢谢
Apache License 2.0
52 stars 19 forks source link

上传接口失败,异常是 java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "value" is null #28

Closed lkkkGitHub closed 9 months ago

lkkkGitHub commented 1 year ago

版本号

2.2.1

什么问题

java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "value" is null

如何复现此问题(描述或者截图)

java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "value" is null at com.github.aqiu202.ideayapi.parser.support.jackson.YApiJacksonSupport.isIgnored(YApiJacksonSupport.java:64) at com.github.aqiu202.ideayapi.parser.support.YApiSupports.isIgnored(YApiSupports.java:54) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldFilter$0(AbstractJsonParser.java:122) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldListFilter$1(AbstractJsonParser.java:127) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldListFilter$2(AbstractJsonParser.java:127) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:139) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseJsonSchema(JsonSchemaParserImpl.java:47) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:73) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:35) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:91) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parseField(AbstractJsonParser.java:185) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:148) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.getJson(AbstractJsonParser.java:112) at com.github.aqiu202.ideayapi.http.res.impl.ResponseResolverImpl.resolve(ResponseResolverImpl.java:45) at com.github.aqiu202.ideayapi.parser.api.impl.ApiResolverImpl.resolve(ApiResolverImpl.java:59) at com.github.aqiu202.ideayapi.parser.impl.PsiMethodParserImpl.parse(PsiMethodParserImpl.java:28) at com.github.aqiu202.ideayapi.parser.impl.PsiClassParserImpl.lambda$parse$0(PsiClassParserImpl.java:37) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.github.aqiu202.ideayapi.parser.impl.PsiClassParserImpl.parse(PsiClassParserImpl.java:38) at com.github.aqiu202.ideayapi.parser.YApiParser.parse(YApiParser.java:69) at com.github.aqiu202.ideayapi.action.YApiUploadAction.actionPerformed(YApiUploadAction.java:56) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:327) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:306) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:350) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:306) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:296) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:289) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:64) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:111) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392) at java.desktop/java.awt.Component.processEvent(Component.java:6413) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

idea 版本

2022.3.3

aqiu202 commented 1 year ago

方便提供一下您的代码片段吗?方便我查找问题

beareverse commented 1 year ago

同出现这个问题: java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "value" is null at com.github.aqiu202.ideayapi.parser.support.jackson.YApiJacksonSupport.isIgnored(YApiJacksonSupport.java:64) at com.github.aqiu202.ideayapi.parser.support.YApiSupports.isIgnored(YApiSupports.java:54) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldFilter$0(AbstractJsonParser.java:122) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldListFilter$1(AbstractJsonParser.java:127) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.lambda$getPsiFieldListFilter$2(AbstractJsonParser.java:127) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:139) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseJsonSchema(JsonSchemaParserImpl.java:47) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:73) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:35) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:91) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseJsonSchema(JsonSchemaParserImpl.java:47) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCompoundField(JsonSchemaParserImpl.java:205) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseFieldValue(JsonSchemaParserImpl.java:118) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseFieldValue(JsonSchemaParserImpl.java:35) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parseField(AbstractJsonParser.java:190) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:148) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseJsonSchema(JsonSchemaParserImpl.java:47) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:73) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCollection(JsonSchemaParserImpl.java:35) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:91) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseJsonSchema(JsonSchemaParserImpl.java:47) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseCompoundField(JsonSchemaParserImpl.java:205) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseFieldValue(JsonSchemaParserImpl.java:118) at com.github.aqiu202.ideayapi.parser.impl.JsonSchemaParserImpl.parseFieldValue(JsonSchemaParserImpl.java:35) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parseField(AbstractJsonParser.java:190) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:148) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parseField(AbstractJsonParser.java:185) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parsePojo(AbstractJsonParser.java:148) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.parse(AbstractJsonParser.java:94) at com.github.aqiu202.ideayapi.parser.abs.AbstractJsonParser.getJson(AbstractJsonParser.java:112) at com.github.aqiu202.ideayapi.http.res.impl.ResponseResolverImpl.resolve(ResponseResolverImpl.java:45) at com.github.aqiu202.ideayapi.parser.api.impl.ApiResolverImpl.resolve(ApiResolverImpl.java:59) at com.github.aqiu202.ideayapi.parser.impl.PsiMethodParserImpl.parse(PsiMethodParserImpl.java:28) at com.github.aqiu202.ideayapi.parser.impl.PsiClassParserImpl.lambda$parse$0(PsiClassParserImpl.java:37) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.github.aqiu202.ideayapi.parser.impl.PsiClassParserImpl.parse(PsiClassParserImpl.java:38) at com.github.aqiu202.ideayapi.parser.YApiParser.parse(YApiParser.java:69) at com.github.aqiu202.ideayapi.action.YApiUploadAction.actionPerformed(YApiUploadAction.java:56) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:333) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:307) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:356) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:307) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:299) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:225) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:292) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:67) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:114) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:114) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6656) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385) at java.desktop/java.awt.Component.processEvent(Component.java:6421) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:790) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:760) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:614) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:569) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

aqiu202 commented 9 months ago

请在最新版本尝试该问题是否还存在,谢谢反馈