Welcome to nipafx.dev. On here, it's:
You. Me. Java.
Nice of you to stop by. I'm nipafx, but you can call me Nicolai 😉, a Java enthusiast with a passion for learning and sharing, online and offline. If you want to sharpen your Java skills, you've come to the right place.
Java 20 🥱#postThe list of big new features that can be used in production with Java 20 is rather short: . (That was it already.) Pretty boring, these six-month releases. We really don't need to take a closer look ...
The Holy Grail of Java Performance - Inside Java Newscast #43#videoThe goal of Project Leyden is to improve the startup time, time to peak performance, and footprint of Java programs. Project lead Mark Reinhold recently proposed to extend the Java programming model with features for selectively shifting and constraining computation with condensors. Let's look at his white paper and roadmap.
Prepare Your Code Bases For Future Java - Inside Java Newscast #41#videoWhat do the security manager, applet API, finalization, and primitive wrapper constructors have in common? What about CMS, Nashorn, RMI activation, and biased locking? And what does jdeprscan have to do with all of this?
Java's Plans for 2023 - Inside Java Newscast #40#videoA summary of what happened in 2022 and what will probably happen in 2023 for Projects Amber, Galahad & Leyden, Lilliput, Loom, Panama, and Valhalla
24 Java Features You Missed In 2022 - Inside Java Newscast #39#videoJDK 18 and JDK 19 preview a number of big ticket features but they also come with a lot of smaller improvements. Here are 24 less-known features that were added to Java in 2022. Among them additions to
HashMap, Security and GC improvements, Custom Localized Date-Time Formats and an Internet Address Resolution SPI, and much more.
From Idea to IDE - How Java Features Are Considered, Designed, And Shipped#talkHow a community of Java enthusiasts drives innovation for 15 years, turning ideas into designs into code into features you can use in your IDE
GraalVM In OpenJDK And More JavaOne Announcements - Inside Java Newscast #36#videoOracle will contribute GraalVM's just-in-time compiler and native image technology to OpenJDK. It will also create EA and GA builds for JavaFX 20+ and is hard at work at creating generational ZGC to vastly improve ZGC's already impressive performance. And then there's the Java SE Subscription Enterprise Performance Pack, a drop-in replacement for JDK 8 with JDK 17 performance.
The Simplest Hello World - Inside Java Newscast #35#videoVisibility, classes, methods, instance and static members, parameters - a newcomer to programming needs to learn all of these concepts to truly understand a simple hello-world program in Java. Time to make that simpler and cut down on what needs to be known up front.
The SolutionFactory To Java's Problems#talkProject Amber steadily and carefully chips away at Java's persistent pain points. This talk discusses released, previewing, and upcoming features achieve that and make Java more expressive, more succinct, and more readable.
Data-Oriented Programming in Java (20)#talkData-oriented programming models data as data: records for entities and sealed types for alternatives. Combined with pattern matching we can define operations on the data without overloading it with functionality.
Loom in the Java Ecosystem - Inside Java Newscast #34#videoAmong other things, Java 19 ships with virtual threads, structured concurrency APIs, sealed types, and pattern matching in
switch- all of them as previews, but still very cool! I'm using these features here to create a GitHub crawler.
Java 19 in Action - Inside Java Newscast #33#videoAmong other things, Java 19 ships with virtual threads, structured concurrency APIs, sealed types, and pattern matching in
switch- all of them as previews, but still very cool! I'm using these features here to create a GitHub crawler.
String Templates, JavaFX 19, Deserialization, and more at JavaOne - Inside Java Newscast #32#videoString templates make it easy and safe to embed variables and expressions in strings; JavaFX 19 comes with many improvements, chief among them derived observables; and the deserialization filter can keep apps safe from certain attacks. More on all of this at JavaOne!
Sequenced Collections, Purity, and more at JavaOne - Inside Java Newscast #31#videoSequenced collections introduce an abstraction for collections with a known encounter order like all lists and some sets and maps. It will be easy to add, get, or remove the first and last elements and to iterate or stream in reverse order. We're also discussing immutable collections and pure functions. More on all of this at JavaOne!
Java Q&A - Inside Java Newscast #30#videoWe asked you for questions on YouTube, Reddit, and Twitter and are here to answer a bunch of them. From projects Amber to Valhalla, Leyden to Lilliput, from language to performance, from the immediate future to pipe dreams we covered a lot of ground.
Data-Oriented Programming - Inside Java Newscast #29#videoData-oriented programming focuses on modeling data as data (instead of as objects). Records for data and sealed types for alternatives let us model immutable data where illegal states are unrepresentable. Combined with pattern matching we get a safe, powerful, and maintainable approach to ad-hoc polymorphism that lets us define operations on the data without overloading it with functionality.
What is OpenJDK? - Inside Java Newscast #28#videoWhat's "OpenJDK" (or "the OpenJDK"?), how does it work, and what does it do? Here's the answer to these questions as well as explorations of JDK Enhancement Proposals, the Java Community Process, why there are so many JDK providers, and how long-term support works.
Java 19 - The Best Java Release? - Inside Java Newscast #27#videoJava 19 is the first release to preview Project Loom's virtual threads and structured concurrency, Project Amber's record patterns, and Project Panama's foreign memory and function APIs. It also continues previews of pattern matching in switch and vector API. Put together, this makes it the most groundbreaking Java release in years and probably for years to come!
Deconstructing Records in Pattern Matching - Inside Java Newscast #26#videoHow record patterns use records' transparency to safely deconstruct them in pattern matching, allowing us to separate checking structure and value of data from processing it.
News Grab Bag: Loom Virtual Threads, Lilliput, Pattern Matching, ... - Inside Java Newscast #25#videoProject Loom's virtual threads are merged and ship with JDK 19 - here's to prepare for them. Also, news on Project Lilliput, proposal for record patterns in pattern matching, some astonishing numbers from Sonatype on Maven Central, and the move of OpenJDK to openjdk.org.
JEP 427 proposes two changes to pattern matching in switch: 1. Guarded patterns, which belonged to patterns, are replaced with when clauses, which belong to the case. 2. null needs to be handled by a specific case null.
nullIn Pattern Matching - Inside Java Newscast #24#video
How To UseSince Java 14 introduced switch expressions, using
switchIn Modern Java#post
switchisn't as straight-forward as it used to be: colons or arrows, statement or expression, labels or patterns? Here's how to best use
switchin modern Java.
Virtual Thread Deep Dive - Inside Java Newscast #23#videoNow that Project Loom's JEP 425 officially proposes virtual threads, it's time to take a close look at them: scheduling and memory management; mounting, unmounting, capturing, and pinning; observability; and and what you can do for optimal scalability - this episode has (almost) everything on virtual threads!
All About JDK 18 - Inside Java Newscast #21#videoRefinements in pattern matching and Panama's foreign and vector APIs; a new command
jwebserverand a new IP address resolution SPI; preparing code for UTF-8 becoming the default character set and for the eventual removal of finalization; and a few more bits and pieces.
Modern Java - Ask Me Anything#talkNew language features, API additions, and JVM improvements; projects Amber, Loom, Panama, and Valhalla; shorter release cadence and free Oracle JDK - there's a lot going on in modern Java. I'll do my best to answer all your questions about it.
State of Pattern Matching with Brian Goetz#videoConversation with Project Amber lead Brian Goetz about pattern matching in Java: Why
Map::getshould be a pattern, the linear thinking trap and how it impacts null handling in pattern matched, exhaustiveness in switch statements and the rehabilitation of
Configuring Maven For Compiled And Tested Code In Javadoc#postFor JDK 18's / JEP 413's embedded snippets to be compiled and tested by your Maven build, they need to be added to a source set, Surefire needs to pick them up, and Javadoc needs to know their location - here's how to do that.
Compiled And Tested Code In Javadoc - Inside Java Newscast #20#videoShort code snippets in Javadoc are a great way to document an API, but they're brittle. JDK 18 / JEP 413 solves that problem by allowing us to reference snippets from external files that are compiled and tested.
More Opinions OnHow much work is it to wrap
Optional? Do you need to
Optionalarguments? What about serializability and framework support? And why consider the type in the first place? Answers in here!
Where to use Optional - Inside Java Newscast #19#videoIs it ok to use
Optionalas parameter type? Overloading is an alternative, but how well does it stack up? Thoughts on this question (and other
Optional-related ones) can usually be put into one of three (and a half) categories.
Java's Plans for 2022 - Inside Java Newscast #18#videoAn update on Java's four key projects: Valhalla, Panama, Loom, and Amber - what they're about, where they are right now, and what their plans are for 2022 and beyond.
Project Loom Brings Structured Concurrency - Inside Java Newscast #17#videoProject Loom aims to bring structured concurrency to Java, a concept that compares to "regular" concurrency like structured programming compares to GOTO-programming - let's dip our toes into this new concept. Also: JDK 18 feature freeze, JDK migration guide, and nifty things to do with the new simple web server.
What Happens to Finalization in JDK 18? - Inside Java Newscast #15#videoFinalization was part of Java from day one to help developers manage resources but it turns out that it's really not good at that. Here's why and what's gonna happen next. Also, reflection and method handles.
Java Next#talkFrom Amber to Loom, from Panama to Valhalla - the four big projects are entering the home stretch. Time to take a closer look at how they will improve Java.
11 Tricks From dev.java - Inside Java Newscast #14#videoFrom compact record constructors to boolean expressions in pattern matching, from generic wildcards to chaining predicates and comparators, from jpackage to jlink - here are 11 Java tricks handpicked from dev.java.
Faster LTS and free JDK with Java 17 - Inside Java Newscast #12#videoJava 17 comes with more than just new features. A faster LTS cadence and free Oracle JDK make this the best-supported modern release ever.
Better Random Number Generation in Java 17#postJava 17 expands the API for random number generation to make it more usable, extensible, and robust with
RandomGeneratorFactoryat its core.
The State of Project Valhalla with Brian Goetz#videoConversation with Project Valhalla lead Brian Goetz about Java's original sin, unifying the type system, expanding generics, current work, the project timeline, and more.
Fast and Secure Inter-process Communication on JDK 16 - Inside Java Newscast #11#videoJDK 16's socket channel / server-socket channel API can use Unix domain sockets for faster and more secure inter-process communication on the same host - also: JDK 17 final release candidate and Oracle Developer Live
Random Numbers and JDK Flight Recorder - Inside Java Newscast #9#videoThe new API for random number generation in Java 17 - why it needed to change and how the new API is more usable, extensible, and robust - and how to get started with JDK Flight Recorder, particularly on Java 16.
Incremental Evolution, Pattern Switches vs Visitor Pattern, and Wayland Support - Inside Java Newscast #8#videoHow the six-month release cadence enabled a more incremental evolution of the Java platform and how pattern switches and sealed classes are an alternative to the visitor pattern. Also, maybe Wayland support for Java.
Visitor Pattern Considered Pointless - Use Pattern Switches Instead#postIn modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity.
nulland Upgrading Past Java 8 - Inside Java Newscast #7#video
nullis never fun, so in this newscast, I explain how to best handle it, what tools can do, and how recent and upcoming language changes help dealing with it. I'll also look at a recent blog post about how Netflix upgraded from Java 8 to 16.
The State of Project Panama with Maurizio Cimadamore#videoConversation with Project Panama lead Maurizio Cimadamore about the project's core mission, the split into foreign-memory access and foreign linker APIs, jextract, performance, interaction with Project Valhalla, the timeline, and more.
Java Modules in Real Life#talkAdvice on why, when, when not, and how to use Java modules in real life for your projects
The State of Project Loom with Ron Pressler#videoConversation with Project Loom lead Ron Pressler about the project's core mission, challenges like interaction with debuggers and garbage collectors, the timeline for the next steps, compatibility and more.
Java 17: Features and Development - Inside Java Newscast #6#videoJava 17, the next long-term support release, enters feature freeze and the release preparations begin today (June 10th). A good time to take a closer look at the list of JEPs as well as the development process.
Pattern Matching in Switches and Security Manager Deprecation - Inside Java Newscast #5#videoJEP 406, which is a candidate for Java 17, introduced pattern matching in
switchstatements and expressions, introduces guarded patterns, and improves null handling. Then we need to talk about JEP 411's deprecation of the security manager.
26 Hours of Java#eventOn May 29th we'll throw a late birthday party for Java, which turned 26 a few days before. With a 26-hour live stream relay race! 🥳
5 Secret Java API Tricks and Record Semantics - Inside Java Newscast #4#videoFive nifty Java API features that you need to know (and many more in the linked thread) and a quick explanation why Java records are not about reducing boilerplate.
Why Java's Records Are Better* Than Lombok'sWhile all three remove boilerplate, the similarities don't go much further. Records have stronger semantics with important downstream benefits, which makes them better*. (* not always; depends on circumstances; excuse the clickbait)
@Dataand Kotlin's Data Classes#post
Why Don't They Just... ?! The Deliberations Behind Evolving Java#talkThere are many nifty features that Java could have but doesn't. Somewhat surprisingly, there are reasons for that and in this talk I'll discuss those for a few concrete cases as well as the deliberations behind such decisions.
JUnit Pioneer - An Exploratory Mission to Jupiter And Beyond#videoFrom growing a community on Twitch to strong documentation, from squashing commits to one-click releases - this presentation covers JUnit Pioneer in all detail
Quicker Java and JDK 16 compatibility - Inside Java Newscast #3#videoA walk through language features, APIs, and JDK capabilities that make Java quicker to use with less ceremony and more immediate results. Also, a rundown of some of the projects with all tests green on JDK 16.
Java Generics III - Wildcards#videoSecond part of a short series on Java Generics - this one explains generics.
? extends Number- that kinda thing.
Java Generics II - Bounded Type Parameters#videoSecond part of a short series on Java generics - this one explains bounded type parameters.
T extends Number- that kinda thing.
Vector API, Record Serialization, And Java 17 Release Schedule - Inside Java Newscast #2#videoShort introduction to the Vector API (incubating in JDK 16) and an update on serializing records. Also, a quick mention of JEP 356 in JDK 17 and the proposed release schedule.
Java 16 Rundown, First Of Java 17 - Inside Java Newscast #1#videoJava 16 got released, so I go over most of the additions like records, Stream APIs, Unix Domain Socket support, and much more. Then there's a first glimpse at Java 17.
To Jupiter And Beyond - On An Exploratory Mission With JUnit Pioneer#talkJUnit Pioneer gathers JUnit 5 extensions. This talk discusses the technical aspects, but also the mission, dev practices, automatic releases, and what Twitch has to do with all of this.
Definitive Guide To Java 16#postA detailed guide to Java 16: records, type patterns, sealed classes;
Streamand HTTP/2 additions, Unix domain socket support; Project Panama previews, packaging tool, performance improvements, and more
Patterns,Project Amber brings new patterns and puts them into
switch, and Valhalla's Primitive Classes - JDK News #2#video
switchwhile Project Valhalla takes off and proposes introducing primitive classes
Code-First Unix Domain Socket Tutorial#postJava's socket channel / server-socket channel API can use Unix domain sockets for faster and more secure inter-process communication on the same host
Type Pattern Matching withType patters with
instanceofare Java's first step towards pattern matching. Motivation, syntax, details, and future applications - here's all you need to know.
Pattern Matching in Java#postJava takes its first steps towards pattern matching but the topic is much larger than
instanceof. Goals, terminology, flow scoping - these apply to all kinds of patterns.
Java's Quirks and Wrong (?) Defaults with Brian Goetz#videoMutability, nullability, serialization, primitives - Nicolai Parlog discusses with Java language architect Brian Goetz why Java is the way it is.
Pattern Matching Quartet - JDK News #1#videoA summary of four recent discussions about pattern matching on the Project Amber mailing lists
Sorting A React App Into Java's Folder Structure#postHow to use react-app-rewired to sort a React app into a Java folder structure with
package.jsonat the root, and sources in
Java 2077#postThe year is 2077, the Java version is 128. It's not LTS. Here's how Loom, Valhalla, Panama, Leyden, Amber, and Jigsaw pushed humanity to the brink. And how you can save us.
BrokenJava 16 adds a new method
Stream::groupwith Java 16's
Streamand it can be abused to simulate a reverse-
groupoperation (with shortcomings).
FasterJava 16 adds a new method
Stream::mapMultiin Java 16#post
Stream. It fills the same role as
flatMap, but is more imperative - and faster.
Java Modules Cheat Sheet#postA cheat sheet for building and running Java modules from the command line with
JUnit Pioneer 1.0#postYesterday we released JUnit Pioneer 1.0 🥳 - here's a quick rundown of its features
Java Generics I - The Basics#videoFirst part of a short series on Java generics - this one explains the basics
25 Hours of Java#eventOn May 23rd 2020, Java turns 25 🥳 and what better way to celebrate its birthday than with a 25-hour live stream? (On Twitch: https://twitch.tv/nipafx)
Modularity with Oliver Drotbohm#videoOliver and I discuss modularity in Java with a focus on the Java module system
Java After Seventeen#talkA live-coding talk during which I update a Java 11/17 code base to Java 21, making good use of new language features, additional and improved APIs, and JVM capabilities
How We Upgraded From Java 8 And Why You Can (And Should) Do It Too#videoMy two minutes of fame during the Oracle Code One 2019 keynote
Definitive Guide To Java 13#postA detailed guide to Java 13: text blocks, switch expressions with yield, ZGC, dynamic AppCDS archives
Improve Launch Times On Java 13 With Application Class-Data Sharing#postOn Java 10+, you can use application class-data sharing to reduce launch times, response time outliers, and memory footprint. By archiving class data with -Xshare:dump and loading it with -Xshare:on, the JVM's class loading workload can be reduced considerably.
Definitive Guide To Switch Expressions In Java 13#postJava 13 finalized switch expressions. Together with a new lambda-style arrow syntax, this makes switch more expressive and less error-prone.
The JPMS Maturity Model#postJava's module system requires consistent support by libraries, frameworks, and tools. This maturity model classifies a project's support for the JPMS.
Evolving Java WithUse
––enable–previewaka Preview Language Features#post
--releaseduring compilation) to experiment with Java's preview features
Definitive Guide To Text Blocks In Java 13#postJava 13 introduces text blocks: string literals that span multiple lines. Learn about syntax, indentation, escape sequences, and formatting.
Best Practices Considered Harmful#talkA lightning talk about how best practices promote a one-size-fits all mentality that harms our ability to create solutions that are tailored to the problems at hand
Immutable Collections In Java - Not Now, Not Ever#postThe JDK contains immutable collections, but no type
ImmutableCollection. Here's why that's so and why it won't change.
The Java Module System with Sander Mak#videoAt J-Fall 2018 I talked to Sander Mak, modularity expert at Luminis, about the Java module system (J_MS), its adoption, how it compares to OSGi, and more.
Caliz III: Hashing scripts and background compilation#videoLetting Caliz store native images and only create them for a given Java "script" (single source file) if needed
Jakarta EE, javax, And A Week Of Turmoil#postDuring a week of turmoil, many people have written about Jakarta EE and javax. This post summarizes the community's opinions and gives you plenty of links.
Caliz II: Wrapping Graal AOT#videoExtending Caliz to create native images of Java "scripts" (single source files) with with Graal
Caliz I: Wrapping JVM 11 and learning about Graal AOT#videoFirst steps toward an acceptable scripting experience with single-source-file execution and Graal native images
Definitive Guide To Java 12#postDetailed Java 12 guide: migration, versions; switch expressions, teeing collectors, indenting/transforming strings (and more); default CDS, Shenandoah, G1.
Teeing Collector in Java 12#postThe teeing collector, available since Java 12 as Collectors::teeing, forwards its input to two other collectors before merging their results with a function.
Java 12 Experiments (Live Stream)#videoIn my first live stream ever (yay!), we explored Java 12's API improvements
Utilities, Singletons and Dependency Injection - Effective Java, Items 3-5#videoMildly surprising (to me), it makes sense to discuss these three patters in one video - so here it goes
Eleven Hidden Gems In Java 11#postEleven small but shiny additions in Java 11 to classes like
Optional, and others that make coding a little more elegant.
Fun WithA live-coding talk where I show off all you need to know about
varin Java. And then some.
Scripting Java 11, Shebang And All#postOn Java 11+, you can run a single source file without compiling it. Beyond experimentation, you can write scripts this way. Even shebang is supported!
Maven 3 / 4 / 5 with Robert Scholte#videoMaven is one of the cornerstones of the Java ecosystem - here I talk with Robert Scholte, Chairman of the Apache Maven projects
Reactive HTTP/2 Requests And Responses In Java 11#postWith Java 11's new reactive HTTP/2 API, request and response bodies can be handled with reactive streams: you can throttle, stream, and cancel early.
First Contact with Switch Expressions in Java 12#videoWith Java 12,
switchis no longer just a statement, but becomes an expression. Let's take a look!
Java 11 HTTP/2 API Tutorial#postTutorial for Java 11's new HTTP/2 API with HttpClient, HttpRequest, and HttpResponse at its center. Shows synchronous and asynchronous request handling.
Use Builders... Cautiously - Effective Java, Item 2#videoWhy and how to avoid the builder pattern and how to make best use of it if you can't
Java 11: A New Dawn - Releases, Oracle JDK vs OpenJDK, and LTS#videoOracle's announcements of the six-month release cadence and new licensing caused quite a ruckus - now that things calmed down, lets discuss where we're headed
All You Need To Know For Migrating To Java 11#postMigrating from Java 8 to Java 11? This has got you covered: licensing, long-term support, preparations, version requirements, migration challenges, and more.
Static Factory Methods - Effective Java, Item 1#videoHow to use static factory methods to overcome three shortcomings of constructors
Kicking off a series on Effective Java, Third Edition#videoKick-off to a YouTube series on Effective Java, Third Edition - let's find some angles Josh didn't cover
JUnit 5 Architecture or "What's Jupiter?"#postThe JUnit 5 architecture promotes a better separation of concerns than JUnit 4 did. It also provides clear APIs for testers (Jupiter) and tools (Platform).
JUnit 5 Basics:The Basics of JUnit 5: How to use
@Test, Lifecycle, Assertions, Assumptions, And More#post
@AfterAll, assertions, and assumptions. How to disable, name, and tag tests.
JUnit 5 Conditions:A detailed look at JUnit 5's
@DisabledOnJre, etc. and how to create custom conditions to flexibly disable test methods.
JUnit 5 - Dynamic Tests#postWith JUnit 5's dynamic tests, we can create tests at run time, for example to parameterize tests, create hierarchical test plans, or define tests with lambdas.
JUnit 5 Extension Model: How To Create Your Own Extensions#postThe JUnit 5 extension model enables detailed, flexible, and powerful additions to JUnit 5's core features. For that it provides specific extension points.
JUnit 5 - Parameterized Tests#postThorough introduction to parameterized tests in JUnit 5 with @ParameterizedTest, argument sources (eg @MethodSource, @CsvSource), and argument converters.
JUnit 5 Setup in IntelliJ, Eclipse, Maven, and Gradle#postHow to set up JUnit 5 so tests run in IntelliJ, Eclipse, Maven, Gradle or, if all else fails, via JUnit 4 or on the command line.
Unlocking Traits WithIn Java 10,
varmakes it is possible to ad-hoc combine traits into an instance that matches your exact requirements. Alas, it has some downsides.
Tricks withLocal-variable type inference with
varand anonymous classes (that you should never use at work)#post
varmakes it easier to work with anonymous classes, e.g. for ad-hoc fields and methods. Don't do it, though!
Unlocking Intersection Types WithJava 10's
varmakes intersection types in Java more approachable. Generics tricks are still needed, but
varmakes it easy to declare such variables.
How To Use Multi-release JARs To Target Multiple Java Versions#postMulti-release JARs allow you to create a single JAR that contains bytecode for several Java versions with jar --version 9 (or 10, or...). Presented with a multi-release JAR, JVMs version 9 and later will load the code that was included for their version.
Code-First Java 9 Tutorial#postShowing code for the most important Java 9 features: private interface methods, stream and optional APIs, collection factories, reactive streams, stack walking, multi-release JARs, redirected platform logging, unified logging, the module system, and more. If you're new to Java 9, start here.
Goodbye 2017, Hello 2018#post2017 draws to a close and 2018 is knocking. My annual review and preview went to my newsletter, so subscribe or head over to Medium to read them.
Maven on Java 9 and later - Six Things You Need To Know#postHow to use the compiler executable, toolchains, and mavenrc to run Maven on Java 9 and how to use mvn/jvm.config and profiles to configure your build.
First Contact With 'var' In Java 10#postJava 10 introduces the
varkeyword, which lets the compiler infer local variable types. Here's how var works, why it exists, how it impacts readability.
First contact withHow to use
varin Java 10#video
var, where it works and where it doesn't (and why), and how it might impact readability
Making JSR 305 Work On Java 9#postUsing annotations from JSR-305 (
@PostConstruct) on Java 9 causes a split package. Here's the fix.
Code-First Java Module System Tutorial#postTutorial of Java 9 module system basics: declare modules with module-info.java, compile, package, launch them, learn of module path and readability graph.
Unified Logging Of JVM Messages With TheJava 9 introduces unified logging, a central mechanism configurable with
-Xlogto observe class loading, threading, garbage collector, module system, etc.
Welcome, Java 9!#videoJava 9 is out today and with other members of the community I'm throwing a welcome party. Get an all around view on the new Java release with various opinions, tips, and great sources!
Impressions of JavaZone 2017#videoA few impressions of my stay at JavaZone 2017 to music from WillRock
Five Command Line Options To Hack The Java Module System#postGet your code running on the Java 9 Module System with the command line options
Planning Your Java 9 Update#postA Java 9 update is not always trivial; quite the opposite, migrating to Java 9 can be challenging. Here's how to gather and categorize problems.
To JAR Hell And Back#talkA live-coding talk where we take a typical Java 8 code base and update it to Java 9 and beyond, overcoming some common and some less common hurdles like dependencies on internal APIs and split packages
Java 9 Migration Guide: The Seven Most Common Challenges#postSolutions to the seven most common challenges for a Java 9 migration. Each of them explained with background, symptoms, and fixes.
A JDeps Tutorial - Analyze Your Project's Dependencies#postJDeps is a dependency analysis tool for Java bytecode (class files and JARs). Learn how to use filters, aggregate results, and create diagrams.
Java 9 Resources - Talks, Articles, Repos, Blogs, Books And Courses#postJava 9 draws and the number of posts and talks about it skyrocketed in the recent months. Here's a list of recommended talks and articles but also further resources where new, high-quality content will pop up.
Optional Dependencies withThe Java Platform Module System allows optional dependencies with
requires static. They are accessible at compile but can be absent at run time.
Parameterized Tests in JUnit 5#videoAt JavaLand 2017, I spent 15 minutes exploring JUnit 5's (then) brand-new parameterized test feature in a NightHacking session
Modern Java - Language, Runtime, LTS#talkIn this talk, I introduce the Java language features, API changes, and JVM capabilities that recent Java releases brought to the ecosystem and also discuss the current release and support model
Repackaging Exceptions In Streams#postHow to repackage checked exceptions that get thrown in a Java stream pipeline so that they can be thrown without the compiler complaining about it.
Expert Java 8#talkWith this talk, I help you get the most out of lambdas,
Optionals, and default methods, helping you master Java 8's core features
Why Elvis Should Not Visit Java#postThe desire for the Elvis operator for easier null-handling echoes through the Java community. But due to Java's type system, it should never be introduced!
SPJCN IV: Quo Vadis Scala#postIn the fourth issue of SitePoint’s Java Channel Newsletter (from October 21st 2016) I summarize the discussion of Scala's presumable demise.
Reflection vs Encapsulation#postReflection wants to break into all code; encapsulation wants to give modules a safe space. How can this stand off be resolved?
Hello 2017!#postTo finish all the projects I started in 2016, I will have to be disciplined and focused in 2017. Discipline and focus, what delightful words to start 2017.
Goodbye 2016, Sorry For Fucking Up#postBesides humanity as a whole fucking up 2016, it went well for me professionally. Maybe because I only cared about me? Possible...
SPJCN III: JavaOne 2016#postIn the third issue of SitePoint’s Java Channel Newsletter (from October 7th 2016) I summarize JavaOne 2016 and recommend interesting talks to watch.
Publishing Snapshots With Gradle's maven-publish Plugin#postA step by step tutorial how to use Gradle and the maven-publish plugin to publish snapshots to Sonatype's Maven snapshot repo.
SPJCN II: What's Taking So Long?#postIn the second issue of SitePoint’s Java Channel Newsletter (from September 23rd 2016) I wonder why Java 9 takes so long.
Rewrite, Architecture, Extensions Of JUnit 5#videoWhat were the reasons for the rewrite? How does JUnit 5 compare to JUnit 4? What's so special about the architecture and the extension points?
What Future Java Might Look Like#postJava's future is full of cool advances: data classes, value types, generics over primitives, pattern matching, etc. Let's peek into Java's future!
SPJCN I: Hello World#postIn the first issue of SitePoint's Java Channel Newsletter (September 9th 2016) I babble about community and conferences.
Code Reviews At Disy - Observations#postAfter reviewing almost all code we wrote for 18 months, completing some 1'500 reviews, we want to share some recommendations.
Code Reviews At Disy - How We Review#postAfter setting out to create a peer review culture we came up with a workflow and picked a tool (yes, Crucible) that would help us get there.
The Ultimate Guide To Java 9#postJava 9 is coming! Besides Jigsaw it brings new language features and many new and improved APIs. Check out the ultimate guide.
Rebutting 5 Common Stream Tropes#postArticles about Java 8's streams often repeat a bunch of tropes: succinctness, ugly mechanics, anemic pipelines, weak exception handling. This is a rebuttal!
Code Reviews At Disy - Where We Were And What We Wanted#postAt Disy we review almost all the code we write. Here, we want to share why that was not always the case and how we started with code reviews.
Goodbye Disy, Hello SitePoint#postI worked for Disy for about 2 years. Now I said goodbye to become the editor of SitePoint's burgeoning Java channel and have more time for other projects.
Oh No, I ForgotIn Java 9
Streamgets a couple of new methods - one of them is an overload of
iteratethat takes a predicate and returns a finite stream.
Java 9 Additions ToJava 9 is coming! One of the changes are new methods on Optional:
ifPresentOrElse(), which considerably improve Optional's API.
Java 9 Additions ToJava 9 is coming! One of the many changes are new Stream methods:
ofNullable. For more fun with streams!
How To Implement hashCode Correctly#postSo you wrote a nice
equalsimplementation? Great! But now you have to implement
hashCodeas well. Let’s see how to do it correctly.
How To Implement equals Correctly#postA fundamental aspect of any Java class is its definition of equality. It is determined by a class's
equalsmethod. Let's see how to implement it correctly.
JEEConf 2016#postMy take on JEEConf 2016: showing the talks I liked the best, raving about the community, romanticizing Kiev, and giving some feedback. Summary: awesome!
JUnit 5#talkIn this talk, I introduce JUnit 5 from basic tests to more advanced features like nesting, parameterization, parallelization, and extensions. We also discuss its architecture and compatibility with JUnit 4.
CodeFX Leveled Up#postA lot of things are happening right now: I'm writing a book, I'll speak at conferences, you can hire me, and to top it off, I gave this blog a new look.
A Doomed Code Review#postCode reviews should be brief, short, and focused. This is the story of how I fucked up on all those accounts and we still made it work.
Seven Reasons Against Blogging#postMany people will tell you how great blogging is but there are downsides, too, and they are rarely discussed. So let me share some reasons against blogging.
The Java Module System Beyond The Basics#talkIn this talk, I go beyond the module system basics and present more advanced features for those who want to become their team's module system expert
Costs And Benefits Of Comments#postAs with most things in software development the ultimate currency for comments is time. This is an analysis of the costs and benefits of comments.
Implied Readability WithIn Java 9 a module must read another to use its API. With implied readability a 3rd module passes the dependency on, allowing the 1st to read the 2nd.
Beware Of findFirst() And findAny()#post
findAny()work with any number of elements in the stream. Make sure to
reduce(toOnlyElement())if there should be at most one.
Hello 2016!#postIn 2016 I want to continue blogging, branch out into new areas, work on my private projects, learn me a Haskell, and prevent exhaustion.Wow, so much to do.
Goodbye 2015!#post2015 is over and I'm looking back.How did it go, which things worked out and which didn't. And how come I'm feeling so tired recently.
Jigsaw Hands-On Guide#postA Jigsaw tutorial explaining how to create modules, state dependencies between them, and use the module system as a service locator to decouple modules.
JDeps Maven Plugin 0.2 Released#postWith v0.2 the JDeps Maven Plugin allows the creation of flexible exceptions from build-breaking for a self-paced preparation for Java 9 and Project Jigsaw.
Six-Month Delay Of Java 9 Release#postMark Reinhold proposed a six-month delay of JSR 376 / Project Jigsaw and thus of the Java 9 release. According to this JDK 9 would come out in March 2017.
JUnit Lambda - The Prototype#postJUnit Lambda will eventually bring us JUnit 5. This is a discussion of the recent prototype, its features, core principles and compatibility considerations.
JavaOne 2015: Under The Hood Of Project Jigsaw#postJavaOne 2015 saw a series of talks by the Project Jigsaw team about modularity in Java 9. This one gives a peek under the hood discussing layers and class loaders.
JavaOne 2015: Advanced Modular Development#postJavaOne 2015 saw a series of talks by the Project Jigsaw team about modularity in Java 9. This one details different migration scenarios.
JavaOne 2015: Introduction to Modular Development#postJavaOne 2015 saw a series of talks by the Project Jigsaw team about modularity in Java 9. This one introduces the basic concepts.
JavaOne 2015: Prepare For JDK 9#postJavaOne 2015 saw a series of talks by the Project Jigsaw team about modularity in Java 9. This one explains how to prepare for it.
Will There Be Module Hell?#postJava 9's Project Jigsaw promises to solve JAR hell but falls short when it comes to conflicting versions. Will there be module hell instead?
JAR Hell#postA list of the problems that make up JAR hell (classpath hell, dependency hell) and how they relate to development tools like Maven and OSGi.
Apache JMeter Tutorial#postWant to load test your web app? Then you should know about Apache JMeter! This tutorial explains the basics and how to create & execute a test plan.
A Taxonomy Of Comments#postA taxonomy of source code comments that enables further discussion about clean code and comments.
Stream Performance - Your Ideas#postAnother post about stream performance - this one implements your ideas about how else to approach the topic.
Stream Performance#postA close look at stream performance. How do they compare to for and for-each loops oder arrays and lists. And what role plays boxing?
Java 8 SE Optional, a strict approach#postStephen Colebourne presented his pragmatic approach to using Optional. I argue for a stricter one that gets us further without considerable downsides.
Interview About Comments On DZone#postMatt Werner from DZone interviewed me about my stance on comments.
Impulse: "Adventures On The Road to Valhalla"#postA summary of Brian Goetz' talk "Adventures On The Road to Valhalla" given at JVMLS in August 2015. Focused on generic specialization and the two prototypes.
All About Project Jigsaw On InfoQ#postMy posts about Project Jigsaw got polished and published on InfoQ.
Thoughts On Comments#postMy rant to comment your fucking code sparked some interesting conversations. Here we discuss some of your and my thoughts on the topic of comments.
Comment Your Fucking Code!#postYou think your code is so clean that it doesn't need comments? Then this rant is just for you!
Casting In Java 8 (And Beyond?)#postProposal to implement new casting methods on Java's
Class. They aim to fulfill the need for improved ways to cast which was created by Java 8.
The Features Project Jigsaw Brings To Java 9#postA detailed presentation of the features Project Jigsaw brings to Java 9: modularization, encapsulation, configuration, performance, and more.
Motivation And Goals Of Project Jigsaw#postA look at how Project Jigsaw (coming in Java 9) aims to solve JAR/classpath hell and at its goals to improve security, maintainability and performance.
LibFX 0.3.0 Released#postRelease post for LibFX 0.3.0 including pointers to GitHub, feature descriptions, Maven coordinates and the Javadoc.
Transforming Collections#postTransforming collections are a view onto another collection, making it appear to be of a different parametric type. They are available in LibFX 0.3.0.
JavaFX, Project Jigsaw and JEP 253#postJEP253 aims to prepare JavaFX for Project Jigsaw by defining public APIs for functionality that will become inaccessible due to modularization.
First Release of JDeps Maven Plugin#postThe JDeps Maven Plugin will break a project's build if it contains dependencies on JDK-internal APIs. This helps to prepare for Java 9.
Impulse: "Crafted Design"#postSummary of the architecture described by Sandro Mancuso in his talk "Crafted Design", held at GeeCON2014.
LibFX 0.2.1 Released#postRelease post for LibFX 0.2.1 including pointers to GitHub, feature descriptions, Maven coordinates and the Javadoc.
How Java 9 And Project Jigsaw May Break Your Code#postWith Java 9 comes Project Jigsaw - a modularization of the JDK - which will break existing code. An overview over the planned changes lets you see whether yours is affected.
Getting Rid Of Anonymous Classes#postAnonymous classes are verbose and obfuscating. Functional implementations can oust them from their last strongholds (mainly abstract classes).
Interface Evolution With Default Methods – Part II: Interfaces#postWhy interface evolution with default methods does not work for whole interfaces - at least not smooth enough to be practical.
Impulse: "Agile Architecture"#postA summary of the talk "Agile Architecture" given by Molly Dishman and Martin Fowler as the keynote at the O'Reilly Software Architecture Conference.
Roll Your Own Pirate-Elvis Operator#postJava has no Elvis operator (or null coalescing operator / null-safe member selection) but with lambda expressions / method references you can roll your own.
Test Collection Implementations with Guava#postHere's how to use Guava-Testlib to easily and thoroughly test your own Java collection implementations.
Interface Evolution With Default Methods - Part I: Methods#postPatterns for interface evolution with default methods: gradually add, replace and remove interface methods without breaking client code.
Value-Based Classes#postAn explanation of value-based classes in Java 8. Why do they exist? What are their limitations? How (not) to use them?
Running Android Emulator With HAXM On Thinkpad T440p#postQuick guide to how to use the Android emulator with HAXM (based on VT-x) on a Thinkpad T440p.
Everything You Need To Know About Default Methods#postCovering literally everything there is to know about Java 8's default methods.
New Javadoc TagsThere are new Javadoc tags used in Java 8:
@implNote. Take a look at their history, meaning and use on command line and with Maven.
Goodbye 2014!#postI'm taking a look at my open source contributions and blogging achievements in 2014.
Instances of Non-Capturing Lambdas#postSee how Java's creation of instances of non-capturing lambda expressions can lead to unexpected and possibly bug-inducing behavior.
Multiple Return Statements#postAn argument for using multiple return statements in a method (as opposed to adhering to the single return myth).
Don't Remove Listeners - Use ListenerHandles#postKeeping references around to remove listeners is a hazard. ListenerHandles encapsulate the complexity and LibFX has an implementation.
LibFX 0.2.0 Released#postRelease post for LibFX 0.2.0 including and pointers to GitHub, Feature descriptions, Maven coordinates and the Javadoc.
JavaFX Sources in Eclipse#postA quick step by step guide how to use the JavaFX sources in Eclipse by attaching them to the current JDK.
Impulse: "Lambdas In Java: A Peek Under The Hood"#postDiscussing the talk "Lambdas in Java: A peek under the hood" given by Brian Goetz at the goto; conference 2013 in Aarhus.
SerializeA summary of why you can't serialize
Optionaland what can be done to deal with that limitation if necessary.
The Serialization Proxy Pattern#postA presentation of the Serialization Proxy Pattern as defined in Effective Java. It defines the pattern, describes its implementation and gives examples.
Concepts of Serialization#postA close look at serialization and a presentation of some key concepts of Java's serialization system.
Why Isn'tDiscussing the reasons for not making Java 8's new type
The Design ofA digest of how
Optionalwas introduced in Java 8, summarizing the many discussions about it and their key points based on the mail archive of JSR-335.
Intention Revealing Code WithWrite intention revealing code with Java 8's new type
Optionaland prevent most NPEs. This is not optional!
Impulse: "Architecture - The Lost Years"#postDiscussing the talk "Architecture - The Lost Years", which Robert C. Martin held on several occasions.
The Decorator Pattern With Default Methods#postUse Java 8's default methods to make the decorator pattern even more beautiful, which results in more concise and readable code.
Impulse: "Workflows of Refactoring"#postDiscussing the keynote "Workflows of Refactoring" by Martin Fowler at OOP 2014, where he categorizes different reasons for and ways of refactoring.
How The Decorator Pattern Saved My Day#postA real-life example how the decorator pattern enables future changes and improves code quality by upholding the Single Responsibility Principle.
CodeFX Up And Running#postSummer recess is officially over and shit got done! Finally, CodeFX is ready to take on the world.
LibFX 0.1.1 Released#postRelease post for LibFX 0.1.1 including a description of
Nestingsand pointers to GitHub, Maven and the Javadoc.