Sign in

Tagir Valeev

@tagir-valeev.bsky.social
386 followers 30 following 97 posts

Work at JetBrains. Java Champion. Check my Java book: mng.bz/671p

PostsRepliesMedia
Tagir Valeev @tagir-valeev.bsky.social · 09/10/2026
It looks like the following is the simplest way to read a file in #Java on Windows if its name ends with spaces. And it's insane.
041
Tagir Valeev @tagir-valeev.bsky.social · 01/10/2026
I was wondering if there's a Java program where `<String>super();` call compiles but produces a different result than `super();`. It looks like it's possible!
static class Super {
    private final String name;

    @SafeVarargs
    <T> Super(T... arr) {
        name = arr.getClass().getComponentType().getName();
    }

    @Override
    public String toString() {
        return name;
    }
}

static class C1 extends Super {
    C1() {
        super();
    }
}

static class C2 extends Super {
    C2() {
        <String>super();
    }
}

void main() {
    IO.println(new C1());
    IO.println(new C2());
}

Result:
java.lang.Object
java.lang.String
050
Tagir Valeev @tagir-valeev.bsky.social · 22/09/2026
Overheard: - What is this button? - Some AI stuff, I don't know. This conversation is literally applicable to any modern UI.
051
Tagir Valeev @tagir-valeev.bsky.social · 15/09/2026
#Java27 is already available in your copy of IntelliJ IDEA (Project Structure -> SDK -> Download JDK). You don't even need to restart it!
000
Tagir Valeev @tagir-valeev.bsky.social · 05/09/2026
It was available in ICU4J library, but now you can create user-readable lists without third-party dependency!
010
Tagir Valeev @tagir-valeev.bsky.social · 05/09/2026
Other languages work as well: > ListFormat.getInstance(Locale.GERMAN, ListFormat.Type.OR, ListFormat.Style.FULL).format(Arrays.asList("Java", "Kotlin", "Scala")) "Java, Kotlin oder Scala"
100
Tagir Valeev @tagir-valeev.bsky.social · 05/09/2026
Totally missed a very cool API appeared in Java 22, ListFormat: > ListFormat.getInstance(Locale.ENGLISH, ListFormat.Type.OR, ListFormat.Style.FULL).format(Arrays.asList("Java", "Kotlin", "Scala")) "Java, Kotlin, and Scala"
160
Tagir Valeev @tagir-valeev.bsky.social · 31/07/2026
It's huge. github.com/openjdk/jdk/...
github.com
8389219: Implement JEP 401: Value Objects (Preview) · openjdk/jdk@cc278db
8389220: Implement JEP 539: Strict Field Initialization in the JVM (Preview) Co-authored-by: David Simms &lt;dsimms@openjdk.org&gt; Co-authored-by: Dan Smith &lt;dlsmith@openjdk.org&gt; Co-authore...
180
Tagir Valeev @tagir-valeev.bsky.social · 28/07/2026
It's a good idea to check your code for numeric overflows. You might think that overflow is impossible, as the number should be ridiculously big to overflow. But this may actually happen!
Screenshot from Flightradar24 showing AIB35LR Melbourne → Toulouse flight with the flight time of 0:25 instead of 24:25.
031
Tagir Valeev @tagir-valeev.bsky.social · 19/07/2026
Released StreamEx 0.9.0. Main change: JSpecify annotations on the library. It should be more null-safe and more Kotlin-friendly now. Bugs are possible, feel free to report. github.com/amaembo/stre...
github.com
GitHub - amaembo/streamex: Enhancing Java Stream API
Enhancing Java Stream API. Contribute to amaembo/streamex development by creating an account on GitHub.
040
Tagir Valeev @tagir-valeev.bsky.social · 02/07/2026
Single log formats time in four different ways. Computers were a mistake.
060
Reposted by Tagir Valeev
Cult.Repo @cultrepo.bsky.social · 25/06/2026
"Write Once. Run Forever: The Java Story" is coming July 17th! Check out the trailer now: youtu.be/8jrKl4teAjY The full film premieres on YouTube on July 17th at 7pm UTC. James Gosling, Java's creator, and other cast members, will join in the chat.
youtu.be
Write Once, Run Forever: The Java Story | Official Trailer | Full Film Coming July 17th
YouTube video by CultRepo
093
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 24/06/2026
Null pointer exceptions are the billion dollar mistake. With Spring Boot 4 & Spring Framework 7 now fully on board with JSpecify, it's time to fix them for good. @0.5ritter.de from the Spring team shows you how. 👇 youtu.be/tpz-FSs6oO4
youtu.be
Nulls are dead - Moritz Halbritter | IntelliJ IDEA Tech Talks
Null pointer exceptions have been called the billion dollar mistake. They are a common source of bugs and frustration. JSpecify aims to fix that, and with Spring Boot 4 and Spring Framework 7 now…
0176
Reposted by Tagir Valeev
JetBrains @jetbrains.com · 21/05/2026
Today is the 15th Global Accessibility Awareness Day #GAAD. In honor of it, we want to share recent improvements to compatibility with assistive technologies across different platforms, keyboard navigation, and non-visual feedback in JetBrains IDEs: blog.jetbrains.com/platform/202...
blog.jetbrains.com
Improving Accessibility in JetBrains IDEs: What’s New and What’s Next in 2026 | The JetBrains Platform Blog
On Global Accessibility Awareness Day, we’re sharing recent improvements and what’s next for assistive technologies, navigation, and non-visual feedback.
062
Tagir Valeev @tagir-valeev.bsky.social · 04/05/2026
The code in question should not be compilable, according to the specification! This is fixed in Java 26, so your code may become broken there.
010
Tagir Valeev @tagir-valeev.bsky.social · 04/05/2026
Thanks to bugs.openjdk.org/browse/JDK-8..., I can now close several long-standing issues in #IntelliJIDEA bug tracker as 'third-party issue'. People reported that IntelliJ erroneously highlights compilable code as red. But it was not our mistake.
bugs.openjdk.org
Loading...
121
Tagir Valeev @tagir-valeev.bsky.social · 24/03/2026
For #IntelliJ plugin writers. blog.jetbrains.com/platform/202...
blog.jetbrains.com
UI Freezes and the Dangers of Non-Cancellable Read Actions in Background Threads | The JetBrains Platform Blog
In JetBrains IDEs, UI freezes are often blamed on “heavy work on the EDT,” but our recent investigations show another common culprit in plugins: long, non-cancellable read actions running in backgroun
022
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 17/03/2026
Big day for #Java – Java 26 is here! ☕ IntelliJ IDEA already supports it, so you can try the new features right away. Read more in our blog post: jb.gg/avyjks. Visiting JavaOne? Stop by the JetBrains booth to talk about Java 26 and IntelliJ IDEA with us in person.
jb.gg
Java 26 in IntelliJ IDEA | The IntelliJ IDEA Blog
Java 26 was released on March 17, 2026. At JetBrains, we are committed to supporting the latest technologies in IntelliJ IDEA and adding useful enhancements for both stable and preview features. In…
0154
Tagir Valeev @tagir-valeev.bsky.social · 17/03/2026
We communicated during the translation, and I was really pleased to see how dedicated he is. He found a few problems in the original text (I added them to errata), he updated links, which became outdated since English edition. His questions show deep understanding of the topic.
030
Tagir Valeev @tagir-valeev.bsky.social · 17/03/2026
LLMs can replace a human translator in many cases, but this level of quality is still impossible for LLMs out-of-the-box 😄
150
Tagir Valeev @tagir-valeev.bsky.social · 17/03/2026
He followed the instructions to do what I'm saying (e.g., create structural search template) in the Japanese-localized #IntelliJIDEA and took the new screenshots. All inspection names match our official translation, he actually looked how we translated them in our localization.
140
Tagir Valeev @tagir-valeev.bsky.social · 17/03/2026
I've received a copy of Japanese translation of my '100 Java Mistakes' book. I love the work done by translator Yoshiki Shibata! He didn't just translate the text.
1101
Tagir Valeev @tagir-valeev.bsky.social · 13/03/2026
Now, you'll get an inspection warning with a quick-fix proposing to use the deconstruction pattern! void print(List<Point> list) { for (Point(int x, int y) : list) { System.out.println(x + ":" + y); } }
Inspection warning: "Can be replaced with enhanced 'for' with a record pattern"Resulting code screenshot (available in the post anyway)
040
Tagir Valeev @tagir-valeev.bsky.social · 13/03/2026
Fun fact: #IntelliJIDEA still supports this feature! Use language level 20 (Preview). Write code like: record Point(int x, int y) {} void print(List<Point> list) { for (Point point : list) { int x = point.x(); int y = point.y(); System.out.println(x + ":" + y); } }
Language level selection dialog in IntelliJ IDEA
110
Tagir Valeev @tagir-valeev.bsky.social · 13/03/2026
Enhanced Local Variable Declarations #Java JEP draft is published! bugs.openjdk.org/browse/JDK-8... Do you remember that the "records in for-each statements" feature was previously a part of JEP 432 and delivered to Java 20 (preview), but dropped since Java 21?
bugs.openjdk.org
Loading...
142
Tagir Valeev @tagir-valeev.bsky.social · 23/02/2026
Girls’ Day at the JetBrains office in Munich, Apr 23rd. The registration is open here: www.girls-day.de/.oO/Show/jet...
girls-day.de
Angebot: Ein Tag in der Welt der Softwareentwicklung
München | 23. April 2026, 10:00 | JetBrains GmbH, München mit Ekaterina Popova
000
Tagir Valeev @tagir-valeev.bsky.social · 12/02/2026
We have AI assistant Glean integrated into the Slack, and it answered privately to her: "today's siren is just a scheduled test and you do not need to leave your workplace". It was not a test or a drill, it was a real fire alarm. Someday, AI will kill us.
Glean answer:

In building ... today’s siren is just a scheduled test and you do not need to leave
your workplace while it's running.

If you're unsure or something seems off (e.g. smoke, smell, people evacuating), call Munich building emergency number ... or ask at reception immediately.
38733
Tagir Valeev @tagir-valeev.bsky.social · 12/02/2026
Today we had a fire alarm in the office. A colleague wrote to a Slack channel 'Fire alarm in the office building', to start a thread if somebody knows any details.
Image of fire brigade near our office
2255
Tagir Valeev @tagir-valeev.bsky.social · 21/01/2026
Just seen on a code review: > .groupBy({ it.second }, { it.first }) People may think it's short and concise. I think, it's cryptic and unreadable. You have to go several lines above and find `to` inside one of previous lambdas to finally understand what is `it.first` and what is `it.second`.
140
Tagir Valeev @tagir-valeev.bsky.social · 07/01/2026
Fun with #Kotlin: a pair of parentheses may cost you a lot!
import kotlin.system.measureTimeMillis

fun main() {
    val set = (0..10000000).toCollection(linkedSetOf())
    repeat(5) {
        val time1 = measureTimeMillis { set.last }
        println("set.last call took $time1 ms")
        val time2 = measureTimeMillis { set.last() }
        println("set.last() call took $time2 ms")
    }
}
set.last call took 1 ms
set.last() call took 71 ms
set.last call took 0 ms
set.last() call took 63 ms
set.last call took 0 ms
set.last() call took 58 ms
set.last call took 0 ms
set.last() call took 61 ms
set.last call took 0 ms
set.last() call took 57 ms
041
Tagir Valeev @tagir-valeev.bsky.social · 17/12/2025
In today crazy #Java series: this code works (with Java 25): <T extends Integer> void test(T t) { t++; //t+=1; IO.println(t); } void main() { test(10); } But if you replace t++ with t+=1, it stops working! Main.​java:3: error: incompatible types: int cannot be converted to T
1111
Tagir Valeev @tagir-valeev.bsky.social · 12/12/2025
Had a talk about JSpecify and IntelliJ IDEA on Coffee + Software channel www.youtube.com/live/K9QIYZM...
youtube.com
Nullability, JSpecify, and IntelliJ with Andrei Kogun and Tagir Valeev
YouTube video by Coffee + Software
031
Tagir Valeev @tagir-valeev.bsky.social · 10/12/2025
Nice commit github.com/stack-auth/s...
010
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 08/12/2025
The IntelliJ IDEA 2025.3 release has landed! This version brings several significant updates, all of which are described and demoed on our What’s New page. Check it out! 👇
jetbrains.com
What's New in IntelliJ IDEA 2025.3
Explore IntelliJ IDEA's latest features and updates to elevate your professional Java and Kotlin development experience.
44712
Tagir Valeev @tagir-valeev.bsky.social · 21/11/2025
Think positive. You have a good chance now to become the longest living person in your town or even state. You can also compete in a local running event in the M75 age category with good chances to win!
000
Tagir Valeev @tagir-valeev.bsky.social · 21/11/2025
I don't know what is sadder: AI that thinks up the things in the absence of reliable information, or people who blindly trust it without checking the sources (there aren't any).
110
Tagir Valeev @tagir-valeev.bsky.social · 21/11/2025
The funny thing is that a person today tried to convince me that this is true. While I don't know your real age, I was like 'huh? Can't be true'. He showed the Google search result as a proof.
100
Tagir Valeev @tagir-valeev.bsky.social · 21/11/2025
@briangoetz.bsky.social are you really this old? 😱
210
Tagir Valeev @tagir-valeev.bsky.social · 18/11/2025
Will you expect this code to be JSpecify-compliant? If not, then how to fix it? @NullMarked public final class Demo { List<String> removeNulls(List<@Nullable String> input) { return input .stream().filter(Objects::nonNull).toList(); } }
101
Tagir Valeev @tagir-valeev.bsky.social · 13/11/2025
You can find the discussion here: youtrack.jetbrains.com/issue/IDEA-3...
youtrack.jetbrains.com
020
Reposted by Tagir Valeev
Sébastien Deleuze @seb.deleuze.fr · 12/11/2025
Don't miss my new blog post in the Road to GA series to learn how the Spring team empowers Spring developers to make their Spring Boot 4 application null-safe, to reduce or remove the risk of NullPointerException and to solve "the billion dollar mistake"! spring.io/blog/2025/11... #spring #java
spring.io
Null-Safe applications with Spring Boot 4
Level up your Java code and explore what Spring can do for you.
04122
Tagir Valeev @tagir-valeev.bsky.social · 12/11/2025
Oh, we had this in my previous job! I can tell you what can go wrong: the limited size of the class constant pool! We actually started hitting it when tried to add more stuff into that huge Utils class.
200
Tagir Valeev @tagir-valeev.bsky.social · 12/11/2025
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.
1100
Tagir Valeev @tagir-valeev.bsky.social · 03/11/2025
Days since I mixed 'ExpressionUtils' and 'ExceptionUtils': 0
140
Tagir Valeev @tagir-valeev.bsky.social · 09/10/2025
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/...
000
Tagir Valeev @tagir-valeev.bsky.social · 08/10/2025
Fixed a static analysis warning in a Java file in the repo . . . It was a demonstration Java file used to onboard users and teach them about IntelliJ IDEA inspections and quick-fixes. The warning was there to illustrate how inspections work 🤦
040
Tagir Valeev @tagir-valeev.bsky.social · 27/09/2025
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.
0115
Tagir Valeev @tagir-valeev.bsky.social · 19/09/2025
Implemented Comparator.min/max for the Java standard library. Should be available since Java 26. ❌comp​.compare(a, b) >= 0 ? a : b ✅comp.max(a, b) bugs.openjdk.org/browse/JDK-8...
bugs.openjdk.org
092
Reposted by Tagir Valeev
Mark Reinhold @mreinhold.org · 16/09/2025
Java 25 / JDK 25: General Availability: mail.openjdk.org/pipermail/jd... Features: openjdk.org/projects/jdk... Downloads: jdk.java.net/25/ #Java25 #JDK25 #OpenJDK #Java
mail.openjdk.org
Java 25 / JDK 25: General Availability
08252
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 16/09/2025
Java 25 LTS is here! 🚀 Ready to tap into the latest #Java features? #IntelliJIDEA supports Java 25 from day one. Let’s dive into what’s new and how your IDE has you covered! 👇 #Java25IntelliJIDEA jb.gg/r70wns
jb.gg
Java 25 LTS and IntelliJ IDEA | The IntelliJ IDEA Blog
Full support for Java 25 is available in IntelliJ IDEA!
03816