-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathtweets.yaml
More file actions
1130 lines (678 loc) · 31 KB
/
tweets.yaml
File metadata and controls
1130 lines (678 loc) · 31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
language/guarded-patterns: |-
☕ Guarded patterns with when
Add conditions to pattern cases using when guards.
Nested if → when Clause (JDK 21+)
🔗 https://javaevolved.github.io/language/guarded-patterns.html
#Java #JavaEvolved
datetime/math-clamp: |-
☕ Math.clamp()
Clamp a value between bounds with a single clear call.
Nested min/max → Math.clamp() (JDK 21+)
🔗 https://javaevolved.github.io/datetime/math-clamp.html
#Java #JavaEvolved
streams/optional-ifpresentorelse: |-
☕ Optional.ifPresentOrElse()
Handle both present and empty cases of Optional in one call.
if/else on Optional → ifPresentOrElse() (JDK 9+)
🔗 https://javaevolved.github.io/streams/optional-ifpresentorelse.html
#Java #JavaEvolved
strings/string-repeat: |-
☕ String.repeat()
Repeat a string n times without a loop.
StringBuilder Loop → repeat() (JDK 11+)
🔗 https://javaevolved.github.io/strings/string-repeat.html
#Java #JavaEvolved
language/unnamed-variables: |-
☕ Unnamed variables with _
Use _ to signal intent when a variable is intentionally unused.
Unused Variable → _ Placeholder (JDK 22+)
🔗 https://javaevolved.github.io/language/unnamed-variables.html
#Java #JavaEvolved
security/strong-random: |-
☕ Strong random generation
Get the platform's strongest SecureRandom implementation.
new SecureRandom() → getInstanceStrong() (JDK 9+)
🔗 https://javaevolved.github.io/security/strong-random.html
#Java #JavaEvolved
io/writing-files: |-
☕ Writing files
Write a String to a file with one line.
FileWriter + BufferedWriter → Files.writeString() (JDK 11+)
🔗 https://javaevolved.github.io/io/writing-files.html
#Java #JavaEvolved
language/pattern-matching-instanceof: |-
☕ Pattern matching for instanceof
Combine type check and cast in one step with pattern matching.
instanceof + Cast → Pattern Variable (JDK 16+)
🔗 https://javaevolved.github.io/language/pattern-matching-instanceof.html
#Java #JavaEvolved
language/static-methods-in-interfaces: |-
☕ Static methods in interfaces
Add static utility methods directly to interfaces instead of separate utility classes.
Utility classes → Interface static methods (JDK 8+)
🔗 https://javaevolved.github.io/language/static-methods-in-interfaces.html
#Java #JavaEvolved
language/module-import-declarations: |-
☕ Module import declarations
Import all exported packages of a module with a single declaration.
Many Imports → import module (JDK 25+)
🔗 https://javaevolved.github.io/language/module-import-declarations.html
#Java #JavaEvolved
strings/string-strip: |-
☕ String.strip() vs trim()
Use Unicode-aware stripping with strip(), stripLeading(), stripTrailing().
trim() → strip() (JDK 11+)
🔗 https://javaevolved.github.io/strings/string-strip.html
#Java #JavaEvolved
tooling/multi-file-source: |-
☕ Multi-file source launcher
Launch multi-file programs without an explicit compile step.
Compile All First → Source Launcher (JDK 22+)
🔗 https://javaevolved.github.io/tooling/multi-file-source.html
#Java #JavaEvolved
datetime/hex-format: |-
☕ HexFormat
Convert between hex strings and byte arrays with HexFormat.
Manual Hex Conversion → HexFormat (JDK 17+)
🔗 https://javaevolved.github.io/datetime/hex-format.html
#Java #JavaEvolved
language/sealed-classes: |-
☕ Sealed classes for type hierarchies
Restrict which classes can extend a type — enabling exhaustive switches.
Open Hierarchy → sealed permits (JDK 17+)
🔗 https://javaevolved.github.io/language/sealed-classes.html
#Java #JavaEvolved
strings/string-isblank: |-
☕ String.isBlank()
Check for blank strings with a single method call.
trim().isEmpty() → isBlank() (JDK 11+)
🔗 https://javaevolved.github.io/strings/string-isblank.html
#Java #JavaEvolved
enterprise/servlet-vs-jaxrs: |-
☕ Servlet versus JAX-RS
Replace verbose HttpServlet boilerplate with declarative JAX-RS resource classes.
HttpServlet → JAX-RS Resource (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/servlet-vs-jaxrs.html
#Java #JavaEvolved
enterprise/jdbc-vs-jooq: |-
☕ JDBC versus jOOQ
Replace raw JDBC string-based SQL with jOOQ's type-safe, fluent SQL DSL.
Raw JDBC → jOOQ SQL DSL (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/jdbc-vs-jooq.html
#Java #JavaEvolved
collections/reverse-list-iteration: |-
☕ Reverse list iteration
Iterate over a list in reverse order with a clean for-each loop.
Manual ListIterator → reversed() (JDK 21+)
🔗 https://javaevolved.github.io/collections/reverse-list-iteration.html
#Java #JavaEvolved
enterprise/jpa-vs-jakarta-data: |-
☕ JPA versus Jakarta Data
Declare a repository interface and let Jakarta Data generate the DAO implementation automatically.
JPA EntityManager → Jakarta Data Repository (JDK 21+)
🔗 https://javaevolved.github.io/enterprise/jpa-vs-jakarta-data.html
#Java #JavaEvolved
tooling/jfr-profiling: |-
☕ JFR for profiling
Profile any Java app with the built-in Flight Recorder — no external tools.
External Profiler → Java Flight Recorder (JDK 9+)
🔗 https://javaevolved.github.io/tooling/jfr-profiling.html
#Java #JavaEvolved
concurrency/stable-values: |-
☕ Stable values
Thread-safe lazy initialization without volatile or synchronized.
Double-Checked Locking → StableValue (JDK 25+)
🔗 https://javaevolved.github.io/concurrency/stable-values.html
#Java #JavaEvolved
enterprise/jdbc-resultset-vs-jpa-criteria: |-
☕ JDBC ResultSet Mapping vs JPA Criteria API
Replace manual JDBC ResultSet mapping with JPA's type-safe Criteria API for dynamic que…
JDBC ResultSet → JPA Criteria API (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/jdbc-resultset-vs-jpa-criteria.html
#Java #JavaEvolved
language/type-inference-with-var: |-
☕ Type inference with var
Use var for local variable type inference — less noise, same safety.
Explicit Types → var keyword (JDK 10+)
🔗 https://javaevolved.github.io/language/type-inference-with-var.html
#Java #JavaEvolved
streams/predicate-not: |-
☕ Predicate.not() for negation
Use Predicate.not() to negate method references cleanly instead of writing lambda wrappers.
Lambda negation → Predicate.not() (JDK 11+)
🔗 https://javaevolved.github.io/streams/predicate-not.html
#Java #JavaEvolved
concurrency/process-api: |-
☕ Modern Process API
Inspect and manage OS processes with ProcessHandle.
Runtime.exec() → ProcessHandle (JDK 9+)
🔗 https://javaevolved.github.io/concurrency/process-api.html
#Java #JavaEvolved
datetime/java-time-basics: |-
☕ java.time API basics
Use immutable, clear date/time types instead of Date and Calendar.
Date + Calendar → java.time.* (JDK 8+)
🔗 https://javaevolved.github.io/datetime/java-time-basics.html
#Java #JavaEvolved
language/pattern-matching-switch: |-
☕ Pattern matching in switch
Replace if-else instanceof chains with clean switch type patterns.
if-else Chain → Type Patterns (JDK 21+)
🔗 https://javaevolved.github.io/language/pattern-matching-switch.html
#Java #JavaEvolved
language/static-members-in-inner-classes: |-
☕ Static members in inner classes
Define static members in inner classes without requiring static nested…
Must use static nested class → Static members in inner classes (JDK 16+)
🔗 https://javaevolved.github.io/language/static-members-in-inner-classes.html
#Java #JavaEvolved
language/record-patterns: |-
☕ Record patterns (destructuring)
Destructure records directly in patterns — extract fields in one step.
Manual Access → Destructuring (JDK 21+)
🔗 https://javaevolved.github.io/language/record-patterns.html
#Java #JavaEvolved
errors/helpful-npe: |-
☕ Helpful NullPointerExceptions
JVM automatically tells you exactly which variable was null.
Cryptic NPE → Detailed NPE (JDK 14+)
🔗 https://javaevolved.github.io/errors/helpful-npe.html
#Java #JavaEvolved
enterprise/spring-null-safety-jspecify: |-
☕ Spring Null Safety with JSpecify
Spring 7 adopts JSpecify annotations, making non-null the default and reducing annota…
Spring @NonNull/@Nullable → JSpecify @NullMarked (JDK 17+)
🔗 https://javaevolved.github.io/enterprise/spring-null-safety-jspecify.html
#Java #JavaEvolved
concurrency/executor-try-with-resources: |-
☕ ExecutorService auto-close
Use try-with-resources for automatic executor shutdown.
Manual Shutdown → try-with-resources (JDK 19+)
🔗 https://javaevolved.github.io/concurrency/executor-try-with-resources.html
#Java #JavaEvolved
streams/stream-tolist: |-
☕ Stream.toList()
Terminal toList() replaces the verbose collect(Collectors.toList()).
Collectors.toList() → .toList() (JDK 16+)
🔗 https://javaevolved.github.io/streams/stream-tolist.html
#Java #JavaEvolved
strings/string-lines: |-
☕ String.lines() for line splitting
Use String.lines() to split text into a stream of lines without regex overhead.
split("\\n") → lines() (JDK 11+)
🔗 https://javaevolved.github.io/strings/string-lines.html
#Java #JavaEvolved
collections/map-entry-factory: |-
☕ Map.entry() factory
Create map entries with a clean factory method.
SimpleEntry → Map.entry() (JDK 9+)
🔗 https://javaevolved.github.io/collections/map-entry-factory.html
#Java #JavaEvolved
concurrency/scoped-values: |-
☕ Scoped values
Share data across call stacks safely without ThreadLocal pitfalls.
ThreadLocal → ScopedValue (JDK 25+)
🔗 https://javaevolved.github.io/concurrency/scoped-values.html
#Java #JavaEvolved
language/markdown-javadoc-comments: |-
☕ Markdown in Javadoc comments
Write Javadoc comments in Markdown instead of HTML for better readability.
HTML-based Javadoc → Markdown Javadoc (JDK 23+)
🔗 https://javaevolved.github.io/language/markdown-javadoc-comments.html
#Java #JavaEvolved
concurrency/completablefuture-chaining: |-
☕ CompletableFuture chaining
Chain async operations without blocking, using CompletableFuture.
Blocking Future.get() → CompletableFuture (JDK 8+)
🔗 https://javaevolved.github.io/concurrency/completablefuture-chaining.html
#Java #JavaEvolved
enterprise/spring-api-versioning: |-
☕ Spring Framework 7 API Versioning
Replace duplicated version-prefixed controllers with Spring Framework 7's native API ver…
Manual URL Path Versioning → Native API Versioning (JDK 17+)
🔗 https://javaevolved.github.io/enterprise/spring-api-versioning.html
#Java #JavaEvolved
io/http-client: |-
☕ Modern HTTP client
Use the built-in HttpClient for clean, modern HTTP requests.
HttpURLConnection → HttpClient (JDK 11+)
🔗 https://javaevolved.github.io/io/http-client.html
#Java #JavaEvolved
streams/stream-mapmulti: |-
☕ Stream.mapMulti()
Emit zero or more elements per input without creating intermediate streams.
flatMap + List → mapMulti() (JDK 16+)
🔗 https://javaevolved.github.io/streams/stream-mapmulti.html
#Java #JavaEvolved
strings/string-formatted: |-
☕ String.formatted()
Call formatted() on the template string itself.
String.format() → formatted() (JDK 15+)
🔗 https://javaevolved.github.io/strings/string-formatted.html
#Java #JavaEvolved
datetime/duration-and-period: |-
☕ Duration and Period
Calculate time differences with type-safe Duration and Period.
Millisecond Math → Duration / Period (JDK 8+)
🔗 https://javaevolved.github.io/datetime/duration-and-period.html
#Java #JavaEvolved
errors/optional-orelsethrow: |-
☕ Optional.orElseThrow() without supplier
Use Optional.orElseThrow() as a clearer, intent-revealing alternative to get().
get() or orElseThrow(supplier) → orElseThrow() (JDK 10+)
🔗 https://javaevolved.github.io/errors/optional-orelsethrow.html
#Java #JavaEvolved
io/path-of: |-
☕ Path.of() factory
Use Path.of() — the modern factory method on the Path interface.
Paths.get() → Path.of() (JDK 11+)
🔗 https://javaevolved.github.io/io/path-of.html
#Java #JavaEvolved
collections/unmodifiable-collectors: |-
☕ Unmodifiable collectors
Collect directly to an unmodifiable list with stream.toList().
collectingAndThen → stream.toList() (JDK 16+)
🔗 https://javaevolved.github.io/collections/unmodifiable-collectors.html
#Java #JavaEvolved
enterprise/manual-transaction-vs-declarative: |-
☕ Manual JPA Transaction vs Declarative @Transactional
Replace verbose begin/commit/rollback blocks with a single @Transactiona…
Manual Transaction → @Transactional (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/manual-transaction-vs-declarative.html
#Java #JavaEvolved
security/tls-default: |-
☕ TLS 1.3 by default
TLS 1.3 is enabled by default — no explicit protocol configuration needed.
Manual TLS Config → TLS 1.3 Default (JDK 11+)
🔗 https://javaevolved.github.io/security/tls-default.html
#Java #JavaEvolved
enterprise/jndi-lookup-vs-cdi-injection: |-
☕ JNDI Lookup vs CDI Injection
Replace fragile JNDI string lookups with type-safe CDI injection for container-managed resources.
JNDI Lookup → CDI @Inject (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/jndi-lookup-vs-cdi-injection.html
#Java #JavaEvolved
errors/null-in-switch: |-
☕ Null case in switch
Handle null directly as a switch case — no separate guard needed.
Guard Before Switch → case null (JDK 21+)
🔗 https://javaevolved.github.io/errors/null-in-switch.html
#Java #JavaEvolved
datetime/instant-precision: |-
☕ Instant with nanosecond precision
Get timestamps with microsecond or nanosecond precision.
Milliseconds → Nanoseconds (JDK 9+)
🔗 https://javaevolved.github.io/datetime/instant-precision.html
#Java #JavaEvolved
language/primitive-types-in-patterns: |-
☕ Primitive types in patterns
Pattern matching now works with primitive types, not just objects.
Manual Range Checks → Primitive Patterns (JDK 25+)
🔗 https://javaevolved.github.io/language/primitive-types-in-patterns.html
#Java #JavaEvolved
language/text-blocks-for-multiline-strings: |-
☕ Text blocks for multiline strings
Write multiline strings naturally with triple-quote text blocks.
String Concatenation → Text Blocks (JDK 15+)
🔗 https://javaevolved.github.io/language/text-blocks-for-multiline-strings.html
#Java #JavaEvolved
io/file-memory-mapping: |-
☕ File memory mapping
Map files larger than 2GB with deterministic cleanup using MemorySegment.
MappedByteBuffer → MemorySegment with Arena (JDK 22+)
🔗 https://javaevolved.github.io/io/file-memory-mapping.html
#Java #JavaEvolved
tooling/junit6-with-jspecify: |-
☕ JUnit 6 with JSpecify null safety
JUnit 6 adopts JSpecify @NullMarked, making null contracts explicit across its assertion API.
Unannotated API → @NullMarked API (JDK 17+)
🔗 https://javaevolved.github.io/tooling/junit6-with-jspecify.html
#Java #JavaEvolved
streams/virtual-thread-executor: |-
☕ Virtual thread executor
Use virtual thread executors for unlimited lightweight concurrency.
Fixed Thread Pool → Virtual Thread Executor (JDK 21+)
🔗 https://javaevolved.github.io/streams/virtual-thread-executor.html
#Java #JavaEvolved
language/switch-expressions: |-
☕ Switch expressions
Switch as an expression that returns a value — no break, no fall-through.
Switch Statement → Switch Expression (JDK 14+)
🔗 https://javaevolved.github.io/language/switch-expressions.html
#Java #JavaEvolved
errors/record-based-errors: |-
☕ Record-based error responses
Use records for concise, immutable error response types.
Map or Verbose Class → Error Records (JDK 16+)
🔗 https://javaevolved.github.io/errors/record-based-errors.html
#Java #JavaEvolved
streams/collectors-flatmapping: |-
☕ Collectors.flatMapping()
Use flatMapping() to flatten inside a grouping collector.
Nested flatMap → flatMapping() (JDK 9+)
🔗 https://javaevolved.github.io/streams/collectors-flatmapping.html
#Java #JavaEvolved
language/diamond-operator: |-
☕ Diamond with anonymous classes
Diamond operator now works with anonymous classes too.
Repeat Type Args → Diamond <> (JDK 9+)
🔗 https://javaevolved.github.io/language/diamond-operator.html
#Java #JavaEvolved
language/compact-canonical-constructor: |-
☕ Compact canonical constructor
Validate and normalize record fields without repeating parameter lists.
Explicit constructor validation → Compact constructor (JDK 16+)
🔗 https://javaevolved.github.io/language/compact-canonical-constructor.html
#Java #JavaEvolved
tooling/aot-class-preloading: |-
☕ AOT class preloading
Cache class loading and compilation for instant startup.
Cold Start Every Time → AOT Cache (JDK 25+)
🔗 https://javaevolved.github.io/tooling/aot-class-preloading.html
#Java #JavaEvolved
io/deserialization-filters: |-
☕ Deserialization filters
Restrict which classes can be deserialized to prevent attacks.
Accept Everything → ObjectInputFilter (JDK 9+)
🔗 https://javaevolved.github.io/io/deserialization-filters.html
#Java #JavaEvolved
enterprise/spring-xml-config-vs-annotations: |-
☕ Spring XML Bean Config vs Annotation-Driven
Replace verbose Spring XML bean definitions with concise annotation-dri…
XML Bean Definitions → Annotation-Driven Beans (JDK 17+)
🔗 https://javaevolved.github.io/enterprise/spring-xml-config-vs-annotations.html
#Java #JavaEvolved
security/key-derivation-functions: |-
☕ Key Derivation Functions
Derive cryptographic keys using the standard KDF API.
Manual PBKDF2 → KDF API (JDK 25+)
🔗 https://javaevolved.github.io/security/key-derivation-functions.html
#Java #JavaEvolved
concurrency/virtual-threads: |-
☕ Virtual threads
Create millions of lightweight virtual threads instead of heavy OS threads.
Platform Threads → Virtual Threads (JDK 21+)
🔗 https://javaevolved.github.io/concurrency/virtual-threads.html
#Java #JavaEvolved
collections/immutable-list-creation: |-
☕ Immutable list creation
Create immutable lists in one clean expression.
Verbose Wrapping → List.of() (JDK 9+)
🔗 https://javaevolved.github.io/collections/immutable-list-creation.html
#Java #JavaEvolved
enterprise/jsf-managed-bean-vs-cdi-named: |-
☕ JSF Managed Bean vs CDI Named Bean
Replace deprecated JSF @ManagedBean with CDI @Named for a unified dependency injection model.
@ManagedBean → @Named + CDI (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/jsf-managed-bean-vs-cdi-named.html
#Java #JavaEvolved
errors/multi-catch: |-
☕ Multi-catch exception handling
Catch multiple exception types in a single catch block.
Separate Catch Blocks → Multi-catch (JDK 7+)
🔗 https://javaevolved.github.io/errors/multi-catch.html
#Java #JavaEvolved
io/try-with-resources-effectively-final: |-
☕ Try-with-resources improvement
Use existing effectively-final variables directly in try-with-resources.
Re-declare Variable → Effectively Final (JDK 9+)
🔗 https://javaevolved.github.io/io/try-with-resources-effectively-final.html
#Java #JavaEvolved
concurrency/lock-free-lazy-init: |-
☕ Lock-free lazy initialization
Replace double-checked locking with StableValue for lazy singletons.
synchronized + volatile → StableValue (JDK 25+)
🔗 https://javaevolved.github.io/concurrency/lock-free-lazy-init.html
#Java #JavaEvolved
collections/stream-toarray-typed: |-
☕ Typed stream toArray
Filter a collection and collect the results to a typed array using a single stream expression.
Manual Filter + Copy → toArray(generator) (JDK 8+)
🔗 https://javaevolved.github.io/collections/stream-toarray-typed.html
#Java #JavaEvolved
tooling/jshell-prototyping: |-
☕ JShell for prototyping
Try Java expressions interactively without creating files.
Create File + Compile + Run → jshell REPL (JDK 9+)
🔗 https://javaevolved.github.io/tooling/jshell-prototyping.html
#Java #JavaEvolved
io/inputstream-transferto: |-
☕ InputStream.transferTo()
Copy an InputStream to an OutputStream in one call.
Manual Copy Loop → transferTo() (JDK 9+)
🔗 https://javaevolved.github.io/io/inputstream-transferto.html
#Java #JavaEvolved
collections/sequenced-collections: |-
☕ Sequenced collections
Access first/last elements and reverse views with clean API methods.
Index Arithmetic → getFirst/getLast (JDK 21+)
🔗 https://javaevolved.github.io/collections/sequenced-collections.html
#Java #JavaEvolved
security/random-generator: |-
☕ RandomGenerator interface
Use the RandomGenerator interface to choose random number algorithms by name without coupling t…
new Random() / ThreadLocalRandom → RandomGenerator factory (JDK 17+)
🔗 https://javaevolved.github.io/security/random-generator.html
#Java #JavaEvolved
language/compact-source-files: |-
☕ Compact source files
Write a complete program without class declaration or public static void main.
Main Class Ceremony → void main() (JDK 25+)
🔗 https://javaevolved.github.io/language/compact-source-files.html
#Java #JavaEvolved
collections/immutable-set-creation: |-
☕ Immutable set creation
Create immutable sets with a single factory call.
Verbose Wrapping → Set.of() (JDK 9+)
🔗 https://javaevolved.github.io/collections/immutable-set-creation.html
#Java #JavaEvolved
concurrency/structured-concurrency: |-
☕ Structured concurrency
Manage concurrent task lifetimes as a single unit of work.
Manual Thread Lifecycle → StructuredTaskScope (JDK 25+)
🔗 https://javaevolved.github.io/concurrency/structured-concurrency.html
#Java #JavaEvolved
tooling/built-in-http-server: |-
☕ Built-in HTTP server
Java 18 includes a built-in minimal HTTP server for prototyping and file serving.
External Server / Framework → jwebserver CLI (JDK 18+)
🔗 https://javaevolved.github.io/tooling/built-in-http-server.html
#Java #JavaEvolved
errors/optional-chaining: |-
☕ Optional chaining
Replace nested null checks with an Optional pipeline.
Nested Null Checks → Optional Pipeline (JDK 9+)
🔗 https://javaevolved.github.io/errors/optional-chaining.html
#Java #JavaEvolved
language/flexible-constructor-bodies: |-
☕ Flexible constructor bodies
Validate and compute values before calling super() or this().
Validate After super() → Code Before super() (JDK 25+)
🔗 https://javaevolved.github.io/language/flexible-constructor-bodies.html
#Java #JavaEvolved
io/reading-files: |-
☕ Reading files
Read an entire file into a String with one line.
BufferedReader → Files.readString() (JDK 11+)
🔗 https://javaevolved.github.io/io/reading-files.html
#Java #JavaEvolved
streams/stream-takewhile-dropwhile: |-
☕ Stream takeWhile / dropWhile
Take or drop elements from a stream based on a predicate.
Manual Loop → takeWhile/dropWhile (JDK 9+)
🔗 https://javaevolved.github.io/streams/stream-takewhile-dropwhile.html
#Java #JavaEvolved
streams/stream-of-nullable: |-
☕ Stream.ofNullable()
Create a zero-or-one element stream from a nullable value.
Null Check → ofNullable() (JDK 9+)
🔗 https://javaevolved.github.io/streams/stream-of-nullable.html
#Java #JavaEvolved
collections/copying-collections-immutably: |-
☕ Copying collections immutably
Create an immutable copy of any collection in one call.
Manual Copy + Wrap → List.copyOf() (JDK 10+)
🔗 https://javaevolved.github.io/collections/copying-collections-immutably.html
#Java #JavaEvolved
enterprise/singleton-ejb-vs-cdi-application-scoped: |-
☕ Singleton EJB vs CDI @ApplicationScoped
Replace Singleton EJBs with CDI @ApplicationScoped beans for simpler shared…
@Singleton EJB → @ApplicationScoped CDI (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/singleton-ejb-vs-cdi-application-scoped.html
#Java #JavaEvolved
security/pem-encoding: |-
☕ PEM encoding/decoding
Encode and decode PEM-formatted cryptographic objects natively.
Manual Base64 + Headers → PEM API (JDK 25+)
🔗 https://javaevolved.github.io/security/pem-encoding.html
#Java #JavaEvolved
language/default-interface-methods: |-
☕ Default interface methods
Add method implementations directly in interfaces, enabling multiple inherita…
Abstract classes for shared behavior → Default methods on interfaces (JDK 8+)
🔗 https://javaevolved.github.io/language/default-interface-methods.html
#Java #JavaEvolved
io/io-class-console-io: |-
☕ IO class for console I/O
The new IO class provides simple, concise methods for console input and output.
System.out / Scanner → IO class (JDK 25+)
🔗 https://javaevolved.github.io/io/io-class-console-io.html
#Java #JavaEvolved
language/records-for-data-classes: |-
☕ Records for data classes
One line replaces 30+ lines of boilerplate for immutable data carriers.
Verbose POJO → record (JDK 16+)
🔗 https://javaevolved.github.io/language/records-for-data-classes.html
#Java #JavaEvolved
language/private-interface-methods: |-
☕ Private interface methods
Extract shared logic in interfaces using private methods.
Duplicated Logic → Private Methods (JDK 9+)
🔗 https://javaevolved.github.io/language/private-interface-methods.html
#Java #JavaEvolved
streams/stream-gatherers: |-
☕ Stream gatherers
Use gatherers for custom intermediate stream operations.
Custom Collector → gather() (JDK 24+)
🔗 https://javaevolved.github.io/streams/stream-gatherers.html
#Java #JavaEvolved
strings/string-chars-stream: |-
☕ String chars as stream
Process string characters as a stream pipeline.
Manual Loop → chars() Stream (JDK 9+)
🔗 https://javaevolved.github.io/strings/string-chars-stream.html
#Java #JavaEvolved
enterprise/soap-vs-jakarta-rest: |-
☕ SOAP Web Services vs Jakarta REST
Replace heavyweight SOAP/WSDL endpoints with clean Jakarta REST resources returning JSON.
JAX-WS / SOAP → Jakarta REST / JSON (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/soap-vs-jakarta-rest.html
#Java #JavaEvolved
enterprise/ejb-timer-vs-jakarta-scheduler: |-
☕ EJB Timer vs Jakarta Scheduler
Replace heavyweight EJB timers with Jakarta Concurrency's ManagedScheduledExecutor…
EJB TimerService → ManagedScheduledExecutorService (JDK 11+)
🔗 https://javaevolved.github.io/enterprise/ejb-timer-vs-jakarta-scheduler.html
#Java #JavaEvolved
concurrency/concurrent-http-virtual: |-
☕ Concurrent HTTP with virtual threads
Fetch many URLs concurrently with virtual threads and HttpClient.
Thread Pool + URLConnection → Virtual Threads + HttpClient (JDK 21+)
🔗 https://javaevolved.github.io/concurrency/concurrent-http-virtual.html
#Java #JavaEvolved
io/files-mismatch: |-
☕ Files.mismatch()
Compare two files efficiently without loading them into memory.
Manual Byte Compare → Files.mismatch() (JDK 12+)
🔗 https://javaevolved.github.io/io/files-mismatch.html
#Java #JavaEvolved
collections/immutable-map-creation: |-
☕ Immutable map creation
Create immutable maps inline without a builder.
Map Builder Pattern → Map.of() (JDK 9+)
🔗 https://javaevolved.github.io/collections/immutable-map-creation.html
#Java #JavaEvolved
tooling/single-file-execution: |-
☕ Single-file execution
Run single-file Java programs directly without javac.
Two-Step Compile → Direct Launch (JDK 11+)
🔗 https://javaevolved.github.io/tooling/single-file-execution.html
#Java #JavaEvolved