Skip to content

Commit e01bb6b

Browse files
committed
make RandomString utility class
1 parent 7c46f08 commit e01bb6b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/org/opensolaris/opengrok/util/RandomString.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@
2323
package org.opensolaris.opengrok.util;
2424

2525
/**
26+
* Utility class that can generate various random strings.
2627
*
2728
* @author Krystof Tulinger
2829
*/
29-
public class RandomString {
30+
public final class RandomString {
3031

32+
private RandomString() {
33+
// Throw an exception if this ever *is* called.
34+
throw new AssertionError("Instantiating utility class " + getClass());
35+
}
36+
3137
public static String generateLower(int length) {
3238
return generate(length, "abcdefghijklmnopqrstuvwxyz");
3339
}

0 commit comments

Comments
 (0)