Sign in

Tagir Valeev

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

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

PostsRepliesMedia
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
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
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
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
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
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
@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
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
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
Tagir Valeev @tagir-valeev.bsky.social · 16/09/2025
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.
110
Reposted by Tagir Valeev
Anton Arhipov @antonarhipov.bsky.social · 16/09/2025
Looks like today is the day for JDK25! openjdk.org/projects/jdk... #java
openjdk.org
JDK 25
1186
Tagir Valeev @tagir-valeev.bsky.social · 05/09/2025
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 😁
030
Tagir Valeev @tagir-valeev.bsky.social · 04/09/2025
Josh's talk was actually very hot 🔥 #JavaZone
371
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 04/09/2025
🔄 Just starting to explore JSpecify or thinking of migrating from another nullability library? Come chat with @tagir-valeev.bsky.social and the team behind the JSpecify support in IntelliJ IDEA – you’ll find them at the @jetbrains.com booth at @javazone.bsky.social‬ 2025!
084
Tagir Valeev @tagir-valeev.bsky.social · 04/09/2025
Java 24 is three times bigger than Java 8. That's the fact, that's simple math. @starbuxman.joshlong.com on #JavaZone
041
Reposted by Tagir Valeev
Marit van Dijk @maritvandijk.bsky.social · 03/09/2025
In person @docker.com help from @shelajev.bsky.social at @javazone.bsky.social - Thank you! #JavaZone
Marit van Dijk and Oleg Šelajev at the JetBrains booth at JavaZone.
0131
Tagir Valeev @tagir-valeev.bsky.social · 03/09/2025
What people see: new modern API to write class files. What I see: missing semicolon at line 8. @rafaelcodes.bsky.social at #JavaZone.
3112
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 03/09/2025
Good morning @javazone.bsky.social 2025! Swing by the @jetbrains.com booth to see what’s new in IntelliJ IDEA 2025.2. 🎤 Don’t miss @maritvandijk.bsky.social’s talk, “Be more productive with IntelliJ IDEA”, at 10:20 am, where she’ll share tips to boost your workflow.
0153
Tagir Valeev @tagir-valeev.bsky.social · 02/09/2025
If you like to chat about Java or IntelliJ, catch me near JetBrains booth on #JavaZone.
030
Tagir Valeev @tagir-valeev.bsky.social · 07/08/2025
get! get! get! get! get!!! #Java25
void main() {
  ThreadLocal<Supplier<Optional<AtomicReference<WeakReference<String>>>>> threadLocal =
    ThreadLocal.withInitial(
      () -> StableValue.supplier(
        () -> Optional.of(new AtomicReference<>(new WeakReference<>("hi")))));

  IO.println(threadLocal.get().get().get().get().get());
}
251
Tagir Valeev @tagir-valeev.bsky.social · 04/08/2025
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 🙂
1140
Tagir Valeev @tagir-valeev.bsky.social · 31/07/2025
As named constructors are not possible in #Java, some non-public constructors in OpenJDK contain bogus parameter, just to differentiate them from other constructors.
/*
     * Package private constructor. Trailing Void argument is there for
     * disambiguating it against other (public) constructors.
     */
    String(AbstractStringBuilder asb, Void sig)
2103
Reposted by Tagir Valeev
IntelliJ IDEA, a JetBrains IDE @intellijidea.com · 29/07/2025
“Sudo, Make Me a Sandwich! – Live Coding With Agentic AI in IntelliJ IDEA” by @antonarhipov.bsky.social is now live: youtu.be/1cx8vDJYi74 Watch Junie, JetBrains’ coding agent, in action and see how far AI can go in dev workflows. #IntelliJIDEAConf
0155
Reposted by Tagir Valeev
Donald Raab @thedonraab.bsky.social · 12/07/2025
I've wanted to buy "100 Java Mistakes..." by @tagir-valeev.bsky.social for a while. Done 👍. Tagir knows so much about Java, and I'm sure I've made many of these mistakes. I'm looking forward to reading this now. 🙏
262