Skip to content

Commit

Permalink
feat(#2270): Make CommitHashesText extend TextEnvelope
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jul 27, 2023
1 parent bc9d42b commit 10e35f9
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.cactoos.Text;
import org.cactoos.text.Sticky;
import org.cactoos.text.TextEnvelope;

/**
* Commit hashes table as text from objectionary.
Expand All @@ -33,14 +34,25 @@
*
* @since 0.29.6
*/
public final class CommitHashesText implements Text {
final class CommitHashesText extends TextEnvelope {

/**
* Cache.
*/
private static final Text CACHE = new Sticky(new ObjectionaryCommitHashes());

@Override
public String asString() throws Exception {
return CommitHashesText.CACHE.asString();
/**
* Constructor.
*/
CommitHashesText() {
this(CommitHashesText.CACHE);
}

/**
* Constructor.
* @param text The text to of commit hashes.
*/
private CommitHashesText(final Text text) {
super(text);
}
}

0 comments on commit 10e35f9

Please sign in to comment.