https://github.com/agrison/vavr-try-refactoring
https://github.com/agrison/vavr-try-refactoring
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/agrison/vavr-try-refactoring
- Owner: agrison
- Created: 2021-02-02T12:08:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T12:44:21.000Z (over 5 years ago)
- Last Synced: 2025-03-06T10:43:03.716Z (over 1 year ago)
- Language: Java
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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** 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.