René's URL Explorer Experiment


Title: 企业微信,获取用户时信息报空指针错误 · Issue #1619 · binarywang/WxJava · GitHub

Open Graph Title: 企业微信,获取用户时信息报空指针错误 · Issue #1619 · binarywang/WxJava

X Title: 企业微信,获取用户时信息报空指针错误 · Issue #1619 · binarywang/WxJava

Description: 简要描述 我用的企业微信是中油定制的企业微信。在获取数据的时候,我的extattr中没有type属性。因此在解析的时候,type是Null,就在 private void buildExtraAttrs(JsonObject o, WxCpUser user) { JsonArray attrJsonElements = o.get(EXTRA_ATTR).getAsJsonObject().get("attrs").getAsJsonArray(); for (Jso...

Open Graph Description: 简要描述 我用的企业微信是中油定制的企业微信。在获取数据的时候,我的extattr中没有type属性。因此在解析的时候,type是Null,就在 private void buildExtraAttrs(JsonObject o, WxCpUser user) { JsonArray attrJsonElements = o.get(EXTRA_ATTR).getAsJsonObject()...

X Description: 简要描述 我用的企业微信是中油定制的企业微信。在获取数据的时候,我的extattr中没有type属性。因此在解析的时候,type是Null,就在 private void buildExtraAttrs(JsonObject o, WxCpUser user) { JsonArray attrJsonElements = o.get(EXTRA_ATTR).getAsJsonObject()...

Opengraph URL: https://github.com/binarywang/WxJava/issues/1619

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"企业微信,获取用户时信息报空指针错误","articleBody":"### 简要描述\r\n我用的企业微信是中油定制的企业微信。在获取数据的时候,我的extattr中没有type属性。因此在解析的时候,type是Null,就在\r\n```\r\n  private void buildExtraAttrs(JsonObject o, WxCpUser user) {\r\n    JsonArray attrJsonElements = o.get(EXTRA_ATTR).getAsJsonObject().get(\"attrs\").getAsJsonArray();\r\n    for (JsonElement attrJsonElement : attrJsonElements) {\r\n      final Integer type = GsonHelper.getInteger(attrJsonElement.getAsJsonObject(), \"type\");\r\n      ---》 这里报错 final WxCpUser.Attr attr = new WxCpUser.Attr().setType(type)\r\n        .setName(GsonHelper.getString(attrJsonElement.getAsJsonObject(), \"name\"));\r\n      user.getExtAttrs().add(attr);\r\n\r\n      switch (type) {\r\n        case 0: {\r\n          attr.setTextValue(GsonHelper.getString(attrJsonElement.getAsJsonObject().get(\"text\").getAsJsonObject(), \"value\"));\r\n          break;\r\n        }\r\n        case 1: {\r\n          final JsonObject web = attrJsonElement.getAsJsonObject().get(\"web\").getAsJsonObject();\r\n          attr.setWebTitle(GsonHelper.getString(web, \"title\"))\r\n            .setWebUrl(GsonHelper.getString(web, \"url\"));\r\n          break;\r\n        }\r\n        default://ignored\r\n      }\r\n    }\r\n  }\r\n```\r\n### 模块版本情况\r\n```\r\n        \u003cdependency\u003e\r\n            \u003cgroupId\u003ecom.github.binarywang\u003c/groupId\u003e\r\n            \u003cartifactId\u003eweixin-java-cp\u003c/artifactId\u003e\r\n            \u003cversion\u003e3.8.0\u003c/version\u003e\r\n        \u003c/dependency\u003e\r\n```\r\n\r\n### 详细描述\r\n经过测试:\r\n```\r\n    @Test\r\n    void testAttr() {\r\n        Integer type = null;\r\n        WxCpUser.Attr attr = new WxCpUser.Attr();\r\n        attr.setType(type);\r\n    }\r\n```\r\n在传递的type为Null的时候,就会报空指针错误。\r\n\r\n而我用的中油即时通的cgi-bin/user/get  api的时候,response中extattr\":{\"attrs\":[{\"name\":\"员工编号\",\"value\":\"xxxxx\"}]}就只有这样,没有type或者咱们sdk中所写的那些attr,希望能修改一下。\r\n\r\n### 即时通API\r\n```json\r\n{\r\n   \"errcode\": 0,\r\n   \"errmsg\": \"ok\",\r\n   \"userid\": \"zhangsan\",\r\n   \"name\": \"李四\",\r\n   \"department\": [1, 2],\r\n   \"order\": [2, 10],\r\n   \"position\": \"后台工程师1\",\r\n   \"positions\": [\"后台工程师1\",\"后台工程师2\"],\r\n   \"mobile\": \"15913215421\",\r\n   \"hide_mobile\": 0,\r\n   \"gender\": \"1\",\r\n   \"email\": \"zhangsan@gzdev.com\",\r\n   \"is_leader_in_dept\": [1, 0],\r\n   \"avatar\": \"http://wx.qlogo.cn/mmopen/ajNVdqHZLLA3WJ6DSZUfiakYe37PKnQhBIeOQBO4czqrnZDS79FH5Wm5m4X69TBicnHFlhiafvDwklOpZeXYQQ2icg/0\",\r\n   \"telephone\": \"020-123456\",\r\n   \"english_name\": \"jackzhang\",\r\n   \"extattr\": {\"attrs\":[{\"name\":\"爱好\",\"value\":\"旅游\"},{\"name\":\"卡号\",\"value\":\"1234567234\"}]},\r\n   \"status\": 1,\r\n   \"enable\": 0,\r\n   \"qr_code\": \"https://wwlocal.qq.com/wework_admin/userQRCode?vcode=vc2140a8b3c6207c74\u0026lvc=vcf6f1acfdc4b45088\"\r\n}\r\n```\r\n\r\n### 日志\r\nhttps://paste.ubuntu.com/p/ZXVyfxmmtm/\r\n","author":{"url":"https://github.com/sdlszjb","@type":"Person","name":"sdlszjb"},"datePublished":"2020-06-12T08:05:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1619/WxJava/issues/1619"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2122620b-da5a-170b-313b-f9758c4bd396
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8662:A4DA3:2ACF371:3B0A3C8:6964E7E8
html-safe-nonce4918a5a12403f1227839a7ffd7f3525aa4ccc17a2e3a1fa40968cd8a30ab35de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjYyOkE0REEzOjJBQ0YzNzE6M0IwQTNDODo2OTY0RTdFOCIsInZpc2l0b3JfaWQiOiI0NzUwMTgxNjg1OTQ2Mjc5OTEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6de23b751b4437f7fd51614e17adec4a4fd46b1e184010e484676dd360de9e59
hovercard-subject-tagissue:637567603
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/binarywang/WxJava/1619/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dbc8e83704049a0238d6076996321528d6d26b99bc3c25e60f035cefa96cc6be/binarywang/WxJava/issues/1619
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dbc8e83704049a0238d6076996321528d6d26b99bc3c25e60f035cefa96cc6be/binarywang/WxJava/issues/1619
og:image:alt简要描述 我用的企业微信是中油定制的企业微信。在获取数据的时候,我的extattr中没有type属性。因此在解析的时候,type是Null,就在 private void buildExtraAttrs(JsonObject o, WxCpUser user) { JsonArray attrJsonElements = o.get(EXTRA_ATTR).getAsJsonObject()...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesdlszjb
hostnamegithub.com
expected-hostnamegithub.com
None3c30097417ecb9dfdab6b2e8bc7dc38d73e183d6ad48f94cb69e4a5daa2dbb87
turbo-cache-controlno-preview
go-importgithub.com/binarywang/WxJava git https://github.com/binarywang/WxJava.git
octolytics-dimension-user_id1343140
octolytics-dimension-user_loginbinarywang
octolytics-dimension-repository_id49122742
octolytics-dimension-repository_nwobinarywang/WxJava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49122742
octolytics-dimension-repository_network_root_nwobinarywang/WxJava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release69fc54a84c74307369dba42af5401200531d116e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/binarywang/WxJava/issues/1619#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbinarywang%2FWxJava%2Fissues%2F1619
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbinarywang%2FWxJava%2Fissues%2F1619
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=binarywang%2FWxJava
Reloadhttps://github.com/binarywang/WxJava/issues/1619
Reloadhttps://github.com/binarywang/WxJava/issues/1619
Reloadhttps://github.com/binarywang/WxJava/issues/1619
binarywang https://github.com/binarywang
WxJavahttps://github.com/binarywang/WxJava
Please reload this pagehttps://github.com/binarywang/WxJava/issues/1619
Notifications https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Fork 9k https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Star 32.4k https://github.com/login?return_to=%2Fbinarywang%2FWxJava
Code https://github.com/binarywang/WxJava
Issues 17 https://github.com/binarywang/WxJava/issues
Pull requests 4 https://github.com/binarywang/WxJava/pulls
Discussions https://github.com/binarywang/WxJava/discussions
Actions https://github.com/binarywang/WxJava/actions
Wiki https://github.com/binarywang/WxJava/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/binarywang/WxJava/security
Please reload this pagehttps://github.com/binarywang/WxJava/issues/1619
Insights https://github.com/binarywang/WxJava/pulse
Code https://github.com/binarywang/WxJava
Issues https://github.com/binarywang/WxJava/issues
Pull requests https://github.com/binarywang/WxJava/pulls
Discussions https://github.com/binarywang/WxJava/discussions
Actions https://github.com/binarywang/WxJava/actions
Wiki https://github.com/binarywang/WxJava/wiki
Security https://github.com/binarywang/WxJava/security
Insights https://github.com/binarywang/WxJava/pulse
New issuehttps://github.com/login?return_to=https://github.com/binarywang/WxJava/issues/1619
New issuehttps://github.com/login?return_to=https://github.com/binarywang/WxJava/issues/1619
企业微信,获取用户时信息报空指针错误https://github.com/binarywang/WxJava/issues/1619#top
企业微信https://github.com/binarywang/WxJava/issues?q=state%3Aopen%20label%3A%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%22
https://github.com/sdlszjb
https://github.com/sdlszjb
sdlszjbhttps://github.com/sdlszjb
on Jun 12, 2020https://github.com/binarywang/WxJava/issues/1619#issue-637567603
https://paste.ubuntu.com/p/ZXVyfxmmtm/https://paste.ubuntu.com/p/ZXVyfxmmtm/
企业微信https://github.com/binarywang/WxJava/issues?q=state%3Aopen%20label%3A%22%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.