-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit size of strings to 65535 bytes
- Loading branch information
1 parent
430a045
commit bacde1c
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
base/src/main/java/proguard/normalize/StringNormalizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package proguard.normalize; | ||
|
||
import proguard.AppView; | ||
import proguard.classfile.visitor.ParallelAllClassVisitor; | ||
import proguard.pass.Pass; | ||
import proguard.pass.PassId; | ||
|
||
/** | ||
* Ensures all strings are at most 65535 bytes in length, when encoded as modified UTF-8. | ||
* | ||
* @see LargeStringSplitter | ||
*/ | ||
public class StringNormalizer implements Pass { | ||
|
||
|
||
@Override | ||
public void execute(AppView appView) throws Exception { | ||
appView.programClassPool.accept( | ||
new ParallelAllClassVisitor( | ||
() -> new LargeStringSplitter(appView.programClassPool, appView.libraryClassPool))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters