RSS feed [root] /weblog /java



title search:


Wed Jun 23 23:53:07 AEST 2021


(google search) (amazon search)
download zip of files only

Mon Feb 11 14:47:44 AEDT 2013 From /weblog/java/discussion

idea of improving java language

These look interesting, worth to take a look:

1) Auto null checking:[..]ebourne?entry=adding_auto_null_checks_to
I don't think this is a good idea as I don't think there is a way can handle default object reference more generic then NULL. However, I would like to have a way to customize NULL behaviour (or default NULL object). Say, for String, I will think empty string ("") is same as NULL. Thus, I would like to have define something like:

public final class Strinig {
null {
return "";
// the rest of string implementation

Then the default reference of String, rather than point to NULL, now it point to an empty String.

2) Add closure to Java:[..]ebourne?entry=adding_closures_to_java_or
Not much comment, it is something nice to have but I don't think really add a lot of value, just like java5 foreach loop.

3) Auto casting:[..]lebourne?entry=adding_auto_casts_to_java
I guess generic already does this?

Of course, there are still some other problem on some people's mind, like:

On the other hand, somebody don't like to change java language as it probably make your code less portable.

4) Some idea of useful util language -

5) API for adding feature -[..]s?track=NL-461&ad=636686&thread_id=49035

A lot more other idea -

Drop extends -[..]at-if-java-8-dropped-extends.html?page=2

(google search) (amazon search)

Sat Jan 05 16:18:39 AEDT 2013 From /weblog/java/performance


An example about improving performance by replace synchronized with volatile -

Log4j can have deadlock due to performance -[..]09/log4j-thread-deadlock-case-study.html

There is always some cost for synchronization -[..]-synchronization-be-optimisede-away.html

(google search) (amazon search)

Tue Jan 01 13:18:52 AEDT 2013 From /weblog/java/features

image analysis

Using OpenCV to detect palm -[..]d-and-finger-detection-using-javacv.html

(google search) (amazon search)

Wed Dec 26 00:14:19 AEDT 2012 From /weblog/java/discussion


Use annotation for default data, rather than hard code it -

(google search) (amazon search)

Sat Dec 22 18:10:39 AEDT 2012 From /weblog/java/annotation


(google search) (amazon search)

Tue Nov 20 02:17:47 AEDT 2012 From /weblog/java/fundamental


Mutable cause issue -

Very detail discussion about implementing equals -[..]avaSolutions/SecretsOfEquals/Equals.html[..]aSolutions/SecretsOfEquals/Equals-2.html

Example of implement and TEST equals -[..]ng-various-equals-and-hashcode_3597.html

Consistent of equals and compareTo -[..]/pitfalls-of-consistent-with-equals.html

(google search) (amazon search)

Tue Oct 02 22:31:57 AEST 2012 From /weblog/java/string


In core libraries like StringBuffer we should prefer the lesser evil of code duplication to the loss of performance. -[..]lder%7D-are-inconsistent-td34479926.html

(google search) (amazon search)

Thu Sep 27 00:53:25 AEST 2012 From /weblog/java/features


How to Normalize Unicode in java:

How to use text collator in java -

Make the string look like same but not equals -

(google search) (amazon search)

Wed Sep 12 00:21:17 AEST 2012 From /weblog/java/hacks


How JVM optimzate the code by understanding the intentional of programmer -[..]/arithmetic-overflow-and-intrinsics.html

(google search) (amazon search)

Sat Aug 18 11:19:36 AEST 2012 From /weblog/java/features


(google search) (amazon search)

Fri Jun 08 02:56:58 AEST 2012 From /weblog/java/concurrency


Collections from IBM -[..]rworks/training/kp/j-kp-actorconcurrency

(google search) (amazon search)

Fri Jun 08 02:50:22 AEST 2012 From /weblog/java/features


A dirty issue from Java Perference API

java.util.prefs.BackingStoreException: Couldn't get file lock.
at java.util.prefs.FileSystemPreferences.sync(
at java.util.prefs.FileSystemPreferences.flush(

(google search) (amazon search)

Sun May 13 02:21:50 AEST 2012 From /weblog/java/features


Compare between StrictMatch, Math and apache FastMath -[..]rformance-of-fastmath-from-commons-math/

A round bug in Java fixed in Java7, nice reading -[..]mathround0499999999999999917-rounds.html

(google search) (amazon search)

Thu Apr 19 01:22:31 AEST 2012 From /weblog/java/discussion


Discussion about reducing latency -[..]n-with-my-channels-nirvana-and-azul.html

(google search) (amazon search)

Fri Mar 02 01:38:45 AEDT 2012 From /weblog/java/fundamental


The process of how to solve problem using thread dump is nice -[..]atform/how-to-analyze-java-thread-dumps/

(google search) (amazon search)

Sat Feb 25 03:23:44 AEDT 2012 From /weblog/java/eclipse


ECF provide some support about this area -

Saros -

(google search) (amazon search)

Tue Feb 21 03:38:28 AEDT 2012 From /weblog/java


Story of how the trace the bottleneck and how how method inline help -[..]ava-7-how-to-write-really-fast-java.html

(google search) (amazon search)

Sun Nov 13 05:37:44 AEDT 2011 From /weblog/java/concurrency


Example of Join -

(google search) (amazon search)

Sat Nov 12 13:22:50 AEDT 2011 From /weblog/java/features


Trouble shooting guide, introduct few tools help to check issues -

(google search) (amazon search)

Sun Oct 30 05:36:47 AEDT 2011 From /weblog/java/hacks

cracking java

"hi there".equals("cheers !") == true
This is because in the JDK 1.3 SUN is caching the hash code so if it once is calculated, it doesn't get recalculated, so if the value field changes, the hashcode stays the same.

How to Modifying an Application without Modifying Its Source Code, with {-Xbootclasspath/p:} -[..]M4OQSNDLPCKH0CJUNN2JVN?_requestid=186396

Override string! -

(google search) (amazon search)

Sun Oct 30 05:36:23 AEDT 2011 From /weblog/java/fundamental


Loading and unloading static fields, unlocd the class -[..]0/java-secret-loading-and-unloading.html

(google search) (amazon search)

Tue Oct 04 03:14:14 AEDT 2011 From /weblog/java/libraries


Cache by size -[..]easy-java-performance-tuning-manage.html

(google search) (amazon search)

Sun Sep 25 11:35:12 AEST 2011 From /weblog/java/concurrency


Yield is not that reliable-[..]-pair-of-somebody-elses-concurrency-bugs

(google search) (amazon search)

Mon Sep 19 02:41:52 AEST 2011 From /weblog/java/features


Develop with real-time Java, Create applications with predictable response times -[..]/training/kp/j-kp-rtj/index.html?ca=drs-

(google search) (amazon search)

Sun Aug 28 21:58:48 AEST 2011 From /weblog/java/concurrency


Sample code of try-sync

import sun.misc.*;

import java.lang.reflect.*;

public class MonitorUtils {
private static Unsafe unsafe = getUnsafe();

public static boolean trySynchronize(Object monitor) {
return unsafe.tryMonitorEnter(monitor);

public static void unsynchronize(Object monitor) {

private static Unsafe getUnsafe() {
try {
for (Field field : Unsafe.class.getDeclaredFields()) {
if (Modifier.isStatic(field.getModifiers())) {
if (field.getType() == Unsafe.class) {
return (Unsafe) field.get(null);
throw new IllegalStateException("Unsafe field not found");
} catch (Exception e) {
throw new IllegalStateException(
"Could not initialize unsafe", e);

(google search) (amazon search)