Package org.apache.pekko.http
Class HashCodeCollider
java.lang.Object
org.apache.pekko.http.HashCodeCollider
Helper that creates strings that all share the same hashCode == 0.
 
Adapted from MIT-licensed code by Andriy Plokhotnyuk at https://github.com/plokhotnyuk/jsoniter-scala/blob/26b5ecdd4f8c2ab7e97bd8106cefdda4c1e701ce/jsoniter-scala-benchmark/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/macros/HashCodeCollider.scala#L6.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic scala.collection.Iterator<Object>asciiCharsAndHash(int previousHash) static scala.collection.immutable.IndexedSeq<Object>static scala.collection.Iterator<String>Creates an iterator of Strings that all have hashCode == 0
- 
Constructor Details- 
HashCodeColliderpublic HashCodeCollider()
 
- 
- 
Method Details- 
visibleChars
- 
asciiChars
- 
asciiCharsAndHash
- 
zeroHashCodeIteratorCreates an iterator of Strings that all have hashCode == 0
 
-