if this is true then length of string i’m using is between 18k to 25k
wait i’m sending it
even worked for me :me:
then the main problem is with old projects
Even i tried this
and it worked
But this not worked
I’d suggest reading this answer on StackOverflow. It says,
Yes. There is a limit of 65535 on the length of a String literal1. It is not stated in the JLS, but it is implied by the structure of the class file; see JVM Spec 4.4.7 and note that the string length field is ‘u2’ … which means a 16 bit unsigned integer.
Note that a String object can have up to 2^31 - 1 characters. The 2^16 -1 limit is for String literals ; e.g. String constants that are embedded in the source code of a Java program.
1 - This limit is actually on the number of bytes in the (modified) UTF-8 representation of the String. If the string consists of characters in the range 0x01 to 0x7f, then each byte represents a single character. Otherwise, a character can require up to 6 bytes.
If you want to a String that represents the first million digits of Pi, then it would be better to read the characters from a file in the filesystem, or a resource on the classpath.
But why there was no error in old version??
TBH, I don’t know.
ok then how can i revert back to old version??
you can say i completely want to remove rush
I won’t suggest you do that. Stay with v1.1.2, and try to use some alternative solution, like, using the StringBuilder or storing the long string as a text file in the extension’s assets and read the text from it when needed.
Sharing you something in P.M. have a look
Hey, I get this error:
and I see I can solve it by adding this in build.gradle:
So, how can I modify build.gradle? Is there any other way to solve this error?
You get that error when your extension (or one of it’s dependencies) use some Java 8 language feature. Currently, Rush doesn’t support use of Java 8 language features (like lambda expressions, method referencing, etc.).
Although, the upcoming release (v1.2.0) will bring support for Java 8 language features in Rush. I hope to release it by the end of next week.
build.gradle
doesn’t exist in Rush as it doesn’t use Gradle. In fact, Rush in itself if a build tool just like Gradle, but designed specifically for building extensions.
Thanks for your explanation, don’t worry, I hope you will release Rush 1.2.0 soon
oh thanks for clearing up
The topic is itself a guide.
Isn’t that enough for you?. There is already all things are listed detailed in the topic. If you are stucked at anywhere then you can ask him.