#nullpointerexception

Replay Jonesy : IT Team BlogReplayJonesy
2025-03-20

🐾 Replay Java: Fight NullPointerException

"In code space, no one hears the 'NullPointerException' scream..." 🛸
How to avoid them? 🛠

1️⃣ Validate inputs
2️⃣ Prefer primitives
3️⃣ Use "equals" wisely
4️⃣ Leverage @NonNull
5️⃣ Embrace Optional
6️⃣ Analyze with SonarQube

👉 Share your NPE-fighting tips! 💬

2025-03-02

[Перевод] 3200% нагрузки на процессор

Совсем недавно моя машина была в таком запущенном состоянии, что я едва мог подключиться к ней через ssh. 3200% нагрузки на CPU — полностью использовались все 32 ядра хоста! Сравните это с моим последним багом, когда использовалось всего одно ядро, то есть 100% К счастью, я использовал среду выполнения Java 17, у которой были дампы потоков с указанием времени CPU!

habr.com/ru/articles/887040/

#nullpointerexception #многопоточность #concurrency #исключения #баги

2024-08-23

[Перевод] JSpecify 1.0.0 и nullability в Java

Рады сообщить, что JSpecify 1.0.0 теперь доступен в Maven Central: четыре аннотации, связанные с nullability — @Nullable, @NonNull, @NullMarked и @NullUnmarked — стали официальными, и, что немаловажно, обратная совместимость с ними будет гарантирована. В новом переводе от команды Spring АйО мы подробнее рассмотрим, какие преимущества и новшества предлагает JSpecify 1.0.0, как это может повлиять на ваш проект и что нам предлагается для борьбы с NPEs.

habr.com/ru/companies/spring_a

#jspecify #nullpointerexception #nullability #java

GripNewsGripNews
2024-07-05

🌗 Linux - 將`kill -11`發送到java進程會引發NullPointerException嗎?- Stack Overflow
➤ HotSpot JVM是如何檢測空指針異常並引發SIGSEGV信號的?
stackoverflow.com/questions/77
在一些邊緣情況下,外部殺死命令可能會導致Java應用程序中的虛假NullPointerException。 但這種行為取決於平臺且難以再現,我成功地在實踐中觸發了此行為。
+ 我從來沒有想過可以通過發送信號來模擬Java應用程序中的NullPointerException。
+ 這種對JVM行爲的探索真是太有趣了!
JVM

Coding Chicacodingchica
2023-08-08

Java protects application performance by using pointers to other memory locations when Objects are stored within an application. However, that means we have to check to see if an address is available before use.

codingchica.com/2023/08/07/its

satiresatire
2023-01-23

@themodestokid C/C++ has been asking that for years.

Null if I know.

2022-12-13

Is there an #IDE that plays that dramatic DA DA DAAAA fanfare whenever you have a #NullPointerException in the #debugger?

Steinar Bangsteinarb
2022-01-06

How I learnt to like Optional steinar.bang.priv.no/?p=450 I used to see Optional<Something> as a completely useless addition to Java, adding to the bloat of Java without being any clearer than checking if a reference is null. I have changed my mind, and now think Optional<> can be useful in making code simpler, easier to under

conejo 🐇🐰 :clippy:conejo
2020-03-09

👏👏👏 t.co/P1oEQ02eIb

« Empezamos la temporada de hablando de trabajo en remoto con @OrestesCA. Espero que os guste!

anchor.fm/null-pointer-excepti

 »

— Retweet twitter.com/elecash/status/123

Ænðr E. Feldstrawaeveltstra
2019-07-02

Half of this is failing to recognize that EMPTY and empty() differ: it thinks they are the same.

Another half of it is data flow anomalies: declaring variables outside of the scopes in which they get used. In this is quite a normal coding behavior.

And then there's the admonishment that we shouldn't be catching a . Well, guess what? The code that throws it is not mine, and my code needs to deal with their errors.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst