- Use explicit and deterministic Docker base image tags
- Install only what you need in production in the Java container image
- Find and fix security vulnerabilities in your Java Docker image
- Use multi-stage builds
- Don’t run Java apps as root
- Properly handle events to safely terminate a Java application
- Gracefully tear down Java applications
- Use .dockerignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Duration; | |
import java.util.List; | |
import java.util.concurrent.locks.ReentrantLock; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
/** | |
* Demonstrate potential for deadlock on a {@link ReentrantLock} when there is both a synchronized and | |
* non-synchronized path to that lock, which can allow a virtual thread to hold the lock, but | |
* other pinned waiters to consume all the available workers. |
The regex patterns below only help validate when something is not valid ICD-10 or ICD-9. They do not ensure that the code exists. You should consult a list of valid ICD codes for that level of verification.
ICD-10-CM list: https://gist.github.com/jakebathman/063c50cb9772e4bfc864a9e1ff4ccc8d
ICD-9 list: https://gist.github.com/jakebathman/f1ed0d473f12091a708243b0ddf03d82
Useful for validating field values that could contain both, and may or may not use decimals