<feed xmlns="http://www.w3.org/2005/Atom"> <id>/</id><title>RG9.DEV</title><subtitle>My personal blog about software development</subtitle> <updated>2026-01-17T12:04:52+01:00</updated> <author> <name>Rafał Garbowski</name> <uri>/</uri> </author><link rel="self" type="application/atom+xml" href="/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="/"/> <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator> <rights> © 2026 Rafał Garbowski </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>OCP 17 Exam - chapter 15 notes - JDBC</title><link href="/posts/ocp-17-exam-chapter-15/" rel="alternate" type="text/html" title="OCP 17 Exam - chapter 15 notes - JDBC" /><published>2025-11-29T00:00:00+01:00</published> <updated>2025-11-29T00:00:00+01:00</updated> <id>/posts/ocp-17-exam-chapter-15/</id> <content type="text/html" src="/posts/ocp-17-exam-chapter-15/" /> <author> <name>Rafał Garbowski</name> </author> <category term="Book notes" /> <summary>Java provides JDBC interfaces, while database libraries provides implementations - except implementation of DriverManager, which is used to create connection (Q.1) if autocommit is enabled (default), then commit happens after every statement (Q.6) if nothing to rollback (changes has been commited), then rollback doesn’t throw any Exception (Q.6) rollback will throw if you try to rollback ...</summary> </entry> <entry><title>OCP 17 Exam - chapter 14 notes - I/O</title><link href="/posts/ocp-17-exam-chapter-14/" rel="alternate" type="text/html" title="OCP 17 Exam - chapter 14 notes - I/O" /><published>2025-10-25T00:00:00+02:00</published> <updated>2025-10-25T00:00:00+02:00</updated> <id>/posts/ocp-17-exam-chapter-14/</id> <content type="text/html" src="/posts/ocp-17-exam-chapter-14/" /> <author> <name>Rafał Garbowski</name> </author> <category term="Book notes" /> <summary>Streams byte streams are called *InputStream/*OutputStream, where character streams are *Reader/*Writer exceptions are PrintWriter and PrintStream exam my trick us by wrapping Writer/Reader into Input/OutputStream or wrapping InputStream into OutputStream be aware that not all readers support mark(int), so program might for some readers throw IOException ...</summary> </entry> <entry><title>OCP 17 Exam - chapter 13 notes - concurrency</title><link href="/posts/ocp-17-exam-chapter-13/" rel="alternate" type="text/html" title="OCP 17 Exam - chapter 13 notes - concurrency" /><published>2025-09-06T00:00:00+02:00</published> <updated>2025-09-06T00:00:00+02:00</updated> <id>/posts/ocp-17-exam-chapter-13/</id> <content type="text/html" src="/posts/ocp-17-exam-chapter-13/" /> <author> <name>Rafał Garbowski</name> </author> <category term="Book notes" /> <summary>Executors be aware whether Executors.newSingleThreadExecutor is used, because running on single thread automatically synchronizes executions, so result will be always consistent (Q.22) awaitTermination(1, TimeUnit.SECONDS) returns false instead of throwing timeout when tasks execution didn’t finish (Q.12) be aware of methods of ScheduledExecutorService - only 1 accepts C...</summary> </entry> <entry><title>OCP 17 Exam - chapter 12 notes - modules</title><link href="/posts/ocp-17-exam-chapter-12/" rel="alternate" type="text/html" title="OCP 17 Exam - chapter 12 notes - modules" /><published>2025-08-09T00:00:00+02:00</published> <updated>2025-08-09T00:00:00+02:00</updated> <id>/posts/ocp-17-exam-chapter-12/</id> <content type="text/html" src="/posts/ocp-17-exam-chapter-12/" /> <author> <name>Rafał Garbowski</name> </author> <category term="Book notes" /> <summary>Note: Java Platform Module System was introduced in JDK 9 in project Jigsaw. In Java 25 modules would be available through imports like regular classes. Running and packaging simple module Folder structure of app: - app - src/pkg - App.java // prints hello world - module-info.java // only module app { } Package names must be unique: e.g. I cannot add class in package “java.util...</summary> </entry> <entry><title>Better raise Error Prone's "EqualsIncompatibleType" check to ERROR</title><link href="/posts/EqualsIncompatibleType/" rel="alternate" type="text/html" title="Better raise Error Prone&amp;apos;s &amp;quot;EqualsIncompatibleType&amp;quot; check to ERROR" /><published>2025-07-31T00:00:00+02:00</published> <updated>2025-07-31T00:00:00+02:00</updated> <id>/posts/EqualsIncompatibleType/</id> <content type="text/html" src="/posts/EqualsIncompatibleType/" /> <author> <name>Rafał Garbowski</name> </author> <category term="Code tips" /> <summary>Let’s consider the following example: var list = List.of(1); var first1 = list.stream().findFirst(); var first2 = list.getFirst(); if (Objects.equals(first1, first2)) { // compiles, just warning in Intellij // unrechable } It’s hard to spot when using var instead of explicit type. In project, I’m working I found a piece of such bug in prod and test code. To force fixing such error, we coul...</summary> </entry> </feed>
