Skip to the content.

Mandali is an innovative library crafted to proactively detect and address potential thread-safety issues in Java and Kotlin classes.

With Mandali, we can effortlessly identify non-thread-safe data structures that may jeopardize your application’s stability in multi-threaded environments. Beyond that, it offers seamless deadlock detection, ensuring smooth and reliable performance during runtime. Elevate your code’s safety and reliability with Mandali’s smart, automated solutions.

Installation

In Gradle

repositories {
    maven { url 'https://repo.repsy.io/mvn/hangga/repo' }
}

dependencies {
    implementation 'io.mandali:mandali:1.0.10-SNAPSHOT'
}

In Maven

<repositories>
    <repository>
        <id>mandali-repo</id>
        <url>https://repo.repsy.io/mvn/hangga/repo</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>io.mandali</groupId>
        <artifactId>mandali</artifactId>
        <version>1.0.10-SNAPSHOT</version>
    </dependency>
</dependencies>

Basic Usage

To start the Mandali analysis, simply create an instance of Mandali and call start() on it:

Mandali(this).start()

Annotation Usage: @RunMandali

This annotation should be applied at the class level of a test to trigger the analysis based on the specified options:

Param descriptions type default
showDate A Boolean parameter that, when set to true, displays the date and time of the analysis run in the output. boolean true
detectDeadlock A Boolean parameter that enables deadlock detection boolean false

Yes, just this simple approach:

@RunMandali(showDate = true, detectDeadlock = true)
class MandaliExampleUnitTest {
    @Test
    fun `some test example`() {
        //...

        Mandali(this).start()
    }
}

Attention, please

It is important to note that this library is very useful for the development stage. But because Mandali works by checking each line of code, it is not recommended for the production stage.

Complete Example

About

The name Mandali is inspired by the Indonesian words “Man = Aman” (safe) and “Dali = terkenDali” (controlled), symbolizing safety under control.

License

Mandali is a proprietary, closed-source library with restrictions on redistribution and modification.

It is free to use, but if you find it valuable, you are welcome to make a donation or become a sponsor. For more information, please contact our development team.