An open API service indexing awesome lists of open source software.

https://github.com/agrison/vavr-try-refactoring


https://github.com/agrison/vavr-try-refactoring

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# Vavr refactoring kata

## Goal

The goal of this kata is to refactor a piece of code using Vavr's `Try` and `Option` to make the code more idiomatic, safe and easier to maintain.

First take a look at the `AccountService` class and its related `AccountServiceTest` test class.

## Pre-requisites

* Java 15
* though this example can be easily downgraded to Java 8 if needed
* an IDE
* with the Lombok plugin
* Maven

## Solution

If you want to see a solution, or if you're not able to find it you may take a look at the [solution](https://github.com/agrison/vavr-try-refactoring/tree/solution) branch.

## Practical Vavr

This example is part of my book [Practical Vavr](https://leanpub.com/practical-vavr).

![Practical Vavr](https://d2sofvawe08yqg.cloudfront.net/practical-vavr/hero?1607247071)

**Practical Vavr** is all about making you want to use **Vavr** in your day to day Java programming.

If you want to improve the quality of your code by using a well-thought and beautifully designed functional programming
library for Java, then you need to adopt Vavr, and this book will help you put it in practice.