Skip to content

Commit 0c38897

Browse files
brunoborgesCopilot
andcommitted
Add README.md and MIT LICENSE
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6f8e0da commit 0c38897

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Bruno Borges
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# java.evolved
2+
3+
**Java has evolved. Your code can too.**
4+
5+
A collection of 86 side-by-side code comparisons showing old Java patterns next to their clean, modern replacements — from Java 8 all the way to Java 25.
6+
7+
🔗 **[javaevolved.github.io](https://javaevolved.github.io)**
8+
9+
---
10+
11+
## What is this?
12+
13+
Every snippet shows two panels:
14+
15+
- **✕ Old** — the traditional way (Java 7/8 era)
16+
- **✓ Modern** — the clean, idiomatic replacement (Java 9–25)
17+
18+
Each comparison includes an explanation of *why* the modern approach is better, which JDK version introduced it, and links to related patterns.
19+
20+
## Categories
21+
22+
| Category | Examples |
23+
|---|---|
24+
| **Language** | Records, sealed classes, pattern matching, switch expressions, var, unnamed variables |
25+
| **Collections** | Immutable factories, sequenced collections, unmodifiable collectors |
26+
| **Strings** | Text blocks, `isBlank()`, `strip()`, `repeat()`, `formatted()`, `indent()` |
27+
| **Streams** | `toList()`, `mapMulti()`, `takeWhile()`/`dropWhile()`, gatherers |
28+
| **Concurrency** | Virtual threads, structured concurrency, scoped values, `ExecutorService` as `AutoCloseable` |
29+
| **I/O** | `Files.readString()`, `writeString()`, `Path.of()`, `transferTo()`, HTTP Client |
30+
| **Errors** | `requireNonNullElse()`, record-based errors, deserialization filters |
31+
| **Date/Time** | `java.time` basics, `Duration`/`Period`, `DateTimeFormatter`, instant precision |
32+
| **Security** | TLS defaults, `SecureRandom`, PEM encoding, key derivation functions |
33+
| **Tooling** | JShell, single-file execution, JFR profiling, compact source files, AOT |
34+
35+
## Tech stack
36+
37+
Plain HTML, CSS, and JavaScript — no frameworks, no build step. Hosted on GitHub Pages.
38+
39+
## Run locally
40+
41+
```bash
42+
cd modern-java
43+
python3 -m http.server 8090
44+
# Open http://localhost:8090
45+
```
46+
47+
## Modernize with GitHub Copilot
48+
49+
GitHub Copilot can help you migrate legacy Java codebases automatically:
50+
51+
- [App Modernization](https://github.com/solutions/use-case/app-modernization)
52+
- [Modernize Java Applications with Copilot](https://docs.github.com/en/enterprise-cloud@latest/copilot/tutorials/modernize-java-applications)
53+
54+
## Contributing
55+
56+
Contributions are welcome! If you'd like to add a new snippet, fix an inaccuracy, or improve the site:
57+
58+
1. Fork the repo
59+
2. Add or edit snippets in `data/snippets.json`
60+
3. Create the corresponding `.html` article page
61+
4. Update `index.html` with the new card
62+
5. Open a pull request
63+
64+
Please ensure JDK version labels only reference the version where a feature became **final** (non-preview).
65+
66+
## Author
67+
68+
**Bruno Borges**
69+
70+
- GitHub: [@brunoborges](https://github.com/brunoborges)
71+
- X/Twitter: [@brunoborges](https://x.com/brunoborges)
72+
- LinkedIn: [brunocborges](https://www.linkedin.com/in/brunocborges)
73+
74+
## License
75+
76+
This project is licensed under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)