Skip to content

Commit b263fbf

Browse files
committed
Factor out constant answer in a singleton to save lots of memory on start up.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1154730 13f79535-47bb-0310-9956-ffa450edef68
1 parent c74687e commit b263fbf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • src/java/org/apache/commons/codec/language/bm

src/java/org/apache/commons/codec/language/bm/Rule.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,16 @@ public static interface RMatcher {
213213
boolean find();
214214
}
215215

216+
/**
217+
* Always returns true.
218+
*/
216219
private static class TrueRMatcher implements RMatcher {
217220

218221
private static TrueRMatcher INSTANCE = new TrueRMatcher();
219222

223+
/**
224+
* Always returns true.
225+
*/
220226
public boolean find() {
221227
return true;
222228
}

0 commit comments

Comments
 (0)