Today I learned: to save gzipped contents into a #java source file (for instance for unit testing), copy-paste doesn't work, as the java #compiler won't accept the raw #gzip characters in a java source file. Instead, first #Base64-#encode the contents, and paste that into the source file. Base64 converts anything to [a-z0-9]/i, which is accepted by javac. #TIL
This in response to the earlier revelation that a #java method can't have more than an integer count of arguments, so we can't pass in more than 65,535 lines of a file (because the 65,536th argument is for the implied "this" argument). And my file happens to be slightly larger than that. By about 130,000 lines. Gzipping and Base64 encoding reduced that to a single line of roughly 10,000 characters, which is accepted by the #java11 #compiler.
@aeveltstra can you post the signature of this method. I am not sure how one would write a method with so many arguments?
@aeveltstra okay found your other post with the varargs. Interesting, I always thought it is syntactic sugar for an array.
Invite-only Mastodon server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!