AsciiArt startup banner: drop the 1s sleep, fix the once-only race, rotate banners
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start at com.dotcms.util.AsciiArt and inspect the doArt() entry point, including the current banner text, guard, and sleep. Replace the single-banner behavior as proposed, preserve valid Java text-block escaping, and compile dotcms-core to verify that the startup banner prints exactly once without Thread.sleep.
Written by the indexing model from the issue text.
Description
Problem
com.dotcms.util.AsciiArt prints a single hardcoded startup banner and blocks the startup thread for a full second doing it:
private static boolean artDone = false; // not thread-safe
...
if (artDone) return; // check-then-set race
...
Thread.sleep(1000); // 1s added to every boot
Three things worth fixing:
Thread.sleep(1000)— a full second of dead time on every startup, purely so the banner lingers. Nothing reads it that fast; the log keeps it.artDoneis a plainbooleanwith a check-then-set — two threads racingdoArt()can both print.- One banner, hardcoded. A small rotating set is nicer and costs nothing.
Proposal
- Replace the single banner with a
String[]of banners, pick one per boot. AtomicBoolean.compareAndSetfor the once-only guard.- Drop the
Thread.sleep(1000).
Notes
Java text blocks still process escape sequences, so any ASCII art containing \ must escape it as \\ or the file will not compile (error: illegal escape character). Use \s to preserve a trailing space, since text blocks strip incidental trailing whitespace.
Acceptance criteria
- Startup banner still prints exactly once
- No
Thread.sleepin the startup path -
dotcms-corecompiles
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 164
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotCMS/core
-
dotCMS : Build Team : Falcon Type : Task
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
OKR : Customer Support Team : Maintenance
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Team : Modernization
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
dotCMS : Workflow Team : Cloud Eng
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
-
Team : Maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100