Tagir Valeev
tagir-valeev.bsky.social
Tagir Valeev
@tagir-valeev.bsky.social
Work at JetBrains. Java Champion. Check my Java book: https://mng.bz/671p
A user reports wrong highlighting in IntelliJ IDEA: the code is red, but both javac compiler and ecj compiler compile the code successfully, using any version of compiler. Next you read the spec and realize that IntelliJ IDEA behavior is correct, and both compilers are wrong. Weird feeling.
November 12, 2025 at 1:03 PM
Is it official now to call the taskbar notification area as 'tray'? I remember Raymond Chen saying that this is wrong 🤔 devblogs.microsoft.com/oldnewthing/...
October 9, 2025 at 8:36 AM
TIL: In #Java, List.subList() and List.reversed() are implemented smartly. You may call these methods as many times as you want and in any order, but you don't get a long chain of references which leads to StackOverflowError. The longest chain of views is two: reversed -> subList -> original list.
September 27, 2025 at 11:49 AM
JetBrains AI Assistant is quite useful for adding Maven dependencies. Take care, though, to update the versions to the latest, as its learning set is somewhat outdated. To update the version, invoke good old code completion.
September 16, 2025 at 1:57 PM
Yesterday during dinner with Javazone speakers, I asked JetBrains Kineto to create an app to check whether a number is prime and show factors if it's not. It took a single prompt and about 30 minutes. It deploys the app automatically. Now I have my very own prime checker 😁
September 5, 2025 at 9:03 AM
Josh's talk was actually very hot 🔥 #JavaZone
September 4, 2025 at 8:50 AM
What people see: new modern API to write class files.
What I see: missing semicolon at line 8.
@rafaelcodes.bsky.social at #JavaZone.
September 3, 2025 at 6:57 PM
If you like to chat about Java or IntelliJ, catch me near JetBrains booth on #JavaZone.
September 2, 2025 at 7:28 PM
get! get! get! get! get!!! #Java25
August 7, 2025 at 1:08 AM
I like how @briangoetz.bsky.social uses type nullability markers ? and ! in an unrelated discussion without even explaining them, like if it's already well-known thing that exists in the language for a long time 🙂
August 4, 2025 at 8:40 PM
As named constructors are not possible in #Java, some non-public constructors in OpenJDK contain bogus parameter, just to differentiate them from other constructors.
July 31, 2025 at 11:14 AM
Using AI slows down experienced developers?
metr.org/blog/2025-07...
July 11, 2025 at 9:01 AM
TIL: In #Java format strings, you can specify indentation to a single percent character.
May 26, 2025 at 9:40 AM
Here's how the analytics for a single flaky test looks like inside the IntelliJ project.
May 22, 2025 at 8:54 AM
And it prints 'From var'. However, you can remove the variable declaration, and it will resolve to a class and print 'From class'. There's no ambiguity, as an instance-bound method reference has a priority over a statically bound one.
April 15, 2025 at 9:48 AM
You can try something simpler, e.g.

void main() {
class C {
static void run() {
System.out.println("From class");
}
}
Runnable C = () -> System.out.println("From var");

Runnable r = C::run;

r​.run();
}

IDE resolves C properly to a variable.
April 15, 2025 at 9:48 AM
Ok, here's my solution. Full of warnings, of course, but who cares about warnings?

void main() {
O<O<O>> O = O<O>::<O>O;
}

interface O<T> {
void use(O c);

default <C> void O() {
}
}
April 15, 2025 at 9:35 AM
What is the output of the following Java code?
A: Outer.Inner​.foo
B: Outer2​.foo
C: Compilation error
D: Runtime exception
(No idea if it's possible to post a poll here)
April 11, 2025 at 2:45 PM
Two lines of code eat too much of time in a user-supplied CPU profile. These lines exist for ages. It's not so clear why they were added. Let's just remove them🤞
April 9, 2025 at 4:39 PM
Luckily, module imports can alleviate this problem. openjdk.org/jeps/494
April 7, 2025 at 6:32 AM
By the way, if you are experimenting with Project Valhalla, your experience will be more pleasant if you select language level = X in the latest #IntelliJIDEA 2025.1 EAP. We've implemented basic parsing, syntax highlighting and even some error highlighting.
April 3, 2025 at 4:08 PM
An interesting note in value classes JEP. You may have private fields in value classes, but they somewhat leak through the == operator. If you can create new objects, you can compare them with an existing one and indirectly determine the value of a private field openjdk.org/jeps/401
April 3, 2025 at 3:53 PM
When writing a regular expression in #IntelliJIDEA, you can complete \p{} character classes and see their description. Also, the description is shown if you hover the class. Works with many host languages: Java, Kotlin, JavaScript, and so on.
April 3, 2025 at 7:24 AM
TIL: Primitive Types in Patterns is an AI-related feature www.itprotoday.com/java/java-24...
March 25, 2025 at 7:16 AM
Antalya airport tests in production!
March 21, 2025 at 9:57 AM