Skip to content

Commit 941a5c8

Browse files
committed
Scramble bits only when using the sophisticated random string generator
1 parent cf8521d commit 941a5c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/sqlancer/Randomly.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ private String getFromStringCache() {
7070
return String.valueOf(Randomly.fromList(cachedLongs));
7171
} else if (Randomly.getBoolean() && !cachedDoubles.isEmpty()) {
7272
return String.valueOf(Randomly.fromList(cachedDoubles));
73-
} else if (Randomly.getBoolean() && !cachedBytes.isEmpty()) {
73+
} else if (Randomly.getBoolean() && !cachedBytes.isEmpty()
74+
&& stringGenerationStrategy == StringGenerationStrategy.SOPHISTICATED) {
7475
return new String(Randomly.fromList(cachedBytes));
7576
} else if (!cachedStrings.isEmpty()) {
7677
String randomString = Randomly.fromList(cachedStrings);

0 commit comments

Comments
 (0)