Skip to content

Java 11 support: Start using var #984

Closed
@iluwatar

Description

@iluwatar

This task is part of the Java 11 transition plan https://github.com/iluwatar/java-design-patterns/wiki/16.-Java-11-Transition

Start using local-variable type inference (var). It is a nice example of syntactic sugar that helps reduce boilerplate code (see https://www.infoq.com/articles/upgrading-java-8-to-12/ and https://winterbe.com/posts/2018/09/24/java-11-tutorial/)

It's a huge task to do this for all the patterns at once so it is possible to create pull requests for individual patterns. This way we can complete the task gradually. The following checklist tracks which patterns have already been refactored.

[x] abstract-document
[x] abstract-factory
[x] acyclic-visitor
[x] adapter
[x] aggregator-microservices
[x] ambassador
[x] api-gateway
[x] async-method-invocation
[x] balking
[x] bridge
[x] builder
[x] business-delegate
[x] bytecode
[x] caching
[x] callback
[x] chain
[x] circuit-breaker
[x] collection-pipeline
[x] command
[x] commander
[x] composite
[x] converter
[x] cqrs
[x] dao
[x] data-bus
[x] data-locality
[x] data-mapper
[x] data-transfer-object
[x] decorator
[x] delegation
[x] dependency-injection
[x] dirty-flag
[x] double-checked-locking
[x] double-dispatch
[x] eip-aggregator
[x] eip-message-channel
[x] eip-publish-subscribe
[x] eip-splitter
[x] eip-wire-tap
[x] event-aggregator
[x] event-asynchronous
[x] event-driven-architecture
[x] event-queue
[x] event-sourcing
[x] execute-around
[x] extension-objects
[x] facade
[x] factory-kit
[x] factory-method
[x] feature-toggle
[x] fluentinterface
[x] flux
[x] flyweight
[x] front-controller
[x] guarded-suspension
[x] half-sync-half-async
[x] hexagonal
[x] intercepting-filter
[x] interpreter
[x] iterator
[x] layers
[x] lazy-loading
[x] leader-election
[x] marker
[x] master-worker-pattern
[x] mediator
[x] memento
[x] model-view-controller
[x] model-view-presenter
[x] module
[x] monad
[x] monostate
[x] multiton
[x] mute-idiom
[x] mutex
[x] naked-objects
[x] null-object
[x] object-mother
[x] object-pool
[x] observer
[x] page-object
[x] partial-response
[x] pipeline
[x] poison-pill
[x] priority-queue
[x] private-class-data
[x] producer-consumer
[x] promise
[x] property
[x] prototype
[x] proxy
[x] queue-load-leveling
[x] reactor
[x] reader-writer-lock
[x] repository
[x] resource-acquisition-is-initialization
[x] retry
[x] role-object
[x] semaphore
[x] servant
[x] serverless
[x] service-layer
[x] service-locator
[x] singleton
[x] spatial-partition
[x] specification
[x] state
[x] step-builder
[x] strategy
[x] template-method
[x] thread-pool
[x] throttling
[x] tls
[x] tolerant-reader
[x] trampoline
[x] twin
[x] typeobjectpattern
[x] unit-of-work
[x] value-object
[x] visitor

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions