Title: java.lang.OutOfMemoryError: Java heap space when decoding non GPP string · Issue #44 · IABTechLab/iabgpp-java · GitHub
Open Graph Title: java.lang.OutOfMemoryError: Java heap space when decoding non GPP string · Issue #44 · IABTechLab/iabgpp-java
X Title: java.lang.OutOfMemoryError: Java heap space when decoding non GPP string · Issue #44 · IABTechLab/iabgpp-java
Description: Add the following test in GppModelTest.java file. // java.lang.OutOfMemoryError: Java heap space @Test public void testDecodingExceptionValidStringButNotGPP() { try { GppModel gppModel = new GppModel("CP48G0AP48G0AEsACCPLAkEgAAAAAEPgAB5Y...
Open Graph Description: Add the following test in GppModelTest.java file. // java.lang.OutOfMemoryError: Java heap space @Test public void testDecodingExceptionValidStringButNotGPP() { try { GppModel gppModel = new GppMod...
X Description: Add the following test in GppModelTest.java file. // java.lang.OutOfMemoryError: Java heap space @Test public void testDecodingExceptionValidStringButNotGPP() { try { GppModel gppModel = new GppMod...
Opengraph URL: https://github.com/IABTechLab/iabgpp-java/issues/44
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"java.lang.OutOfMemoryError: Java heap space when decoding non GPP string","articleBody":"Add the following test in GppModelTest.java file.\r\n\r\n```\r\n // java.lang.OutOfMemoryError: Java heap space\r\n @Test\r\n public void testDecodingExceptionValidStringButNotGPP() {\r\n try {\r\n GppModel gppModel = new GppModel(\"CP48G0AP48G0AEsACCPLAkEgAAAAAEPgAB5YAAAQaQD2F2K2kKFkPCmQWYAQBCijYEAhQAAAAkCBIAAgAUgQAgFIIAgAIFAAAAAAAAAQEgCQAAQABAAAIACgAAAAAAIAAAAAAAQQAAAAAIAAAAAAAAEAAAAAAAQAAAAIAABEhCAAQQAEAAAAAAAQAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAgAA\");\r\n Assertions.fail(\"Expected LazyDecodingException\");\r\n } catch (DecodingException e) {\r\n\r\n }\r\n }\r\n```\r\n\r\nThe proposed solution is to validate the first 2 numbers in the header of the message, to fail fast if the string is not GPP.\r\nSo, in HeaderV1.java:\r\n```\r\n private static final String ID_BITSTRING = \"000011\";\r\n private static final String VERSION_BITSTRING = \"000001\";\r\n private static final String HEADER_PREFIX_BITSTRING = ID_BITSTRING + VERSION_BITSTRING;\r\n @Override\r\n public void decode(String encodedString) throws DecodingException {\r\n String bitString = base64UrlEncoder.decode(encodedString);\r\n if (!bitString.startsWith(HEADER_PREFIX_BITSTRING)) {\r\n throw new DecodingException(\"Not GPP v1 string\");\r\n };\r\n this.decodeFromBitString(bitString);\r\n }\r\n\r\n```\r\n","author":{"url":"https://github.com/alex-ro","@type":"Person","name":"alex-ro"},"datePublished":"2024-01-26T07:37:47Z","url":"https://github.com/IABTechLab/iabgpp-java/issues/44"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2aae5806-efdb-1aae-8ade-43f05656664e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CAE:288E9A:180C84:1FBF94:6AF65E33 |
| html-safe-nonce | aacf45a3055bca25e65716158922d5c33668ec5f4e9aaec253faf4b62838acd1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0FFOjI4OEU5QToxODBDODQ6MUZCRjk0OjZBRjY1RTMzIiwidmlzaXRvcl9pZCI6IjQ3OTI4NTc2Mjc3ODE5MTQxNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 03079881916156248da5a272c6ead9ae0713c1131f8552f2cdc2d562c136a0da |
| hovercard-subject-tag | issue:2101732471 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IABTechLab/iabgpp-java/44/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c76588eaec9baca2f4fba9f83494ede607d92e5573a6f557fddda119e6acabd/IABTechLab/iabgpp-java/issues/44 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c76588eaec9baca2f4fba9f83494ede607d92e5573a6f557fddda119e6acabd/IABTechLab/iabgpp-java/issues/44 |
| og:image:alt | Add the following test in GppModelTest.java file. // java.lang.OutOfMemoryError: Java heap space @Test public void testDecodingExceptionValidStringButNotGPP() { try { GppModel gppModel = new GppMod... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alex-ro |
| hostname | github.com |
| expected-hostname | github.com |
| None | fded9ab97d594702a6a4ebcef0ee4f94c91fb16da7c62cac91ee0125e9c2d58c |
| turbo-cache-control | no-preview |
| go-import | github.com/IABTechLab/iabgpp-java git https://github.com/IABTechLab/iabgpp-java.git |
| octolytics-dimension-user_id | 82903538 |
| octolytics-dimension-user_login | IABTechLab |
| octolytics-dimension-repository_id | 538620496 |
| octolytics-dimension-repository_nwo | IABTechLab/iabgpp-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 538620496 |
| octolytics-dimension-repository_network_root_nwo | IABTechLab/iabgpp-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39cd7745159797c426e62ba2199c584d653d4b32 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width