Sonntag, 28. September 2014
Samstag, 27. September 2014
Mittwoch, 24. September 2014
Dienstag, 23. September 2014
Sonntag, 21. September 2014
Samstag, 20. September 2014
Der August hat schon wieder einen Vogel gefangen. Diesen habe ich leider nicht mehr retten können ;(
Und just als ich mir gedacht habe "gut, dass er sich mit seiner Beute in die Schachtel verzogen hat - da muss ich nicht wieder das halbe Haus putzen", ist er aus dem Keller gekommen und hat den Vogel und sein Frühstück vor und in die Küche gekotzt.
Wie zu erkennen war, hat der Depp den Vogel (es war ein Spatz) im Ganzen geschluckt. Halbverdauter, warmer Thunfisch in der Früh zählt nicht gerade zu meinen Favoriten...
Donnerstag, 18. September 2014
Why Spring makes me sick #16
In a project I have to work on, there is amongst others a definition of a simple bean of class testDoubles.MemoryLogClient.
So I was expecting that if I retrieved that bean from the Spring application context, that it is of type testDoubles.MemoryLogClient.
But Spring actually replaces the bean by a proxy (the retrieved bean is of type com.sun.proxy.$Proxy) and to make things worse, overrides the toString() method so that it reports type testDoubles.MemoryLogClient.
I.e. in my debug logs I see that the object reports to be of the correct type, but an assignment to a variable of the same type fails with a ClassCastException.
Yet another way Spring makes a developers life really hard...
Oh, by the way, the IMHO simplest solution is to extract an interface (in my case from testDoubles.MemoryLogClient) and assign the retrieved bean to a variable that has this interface as type.
But you will find much more complicated solutions on the interwebs (such as stackoverflow.com) that suggest to use AOP, which will convert this problem into a full blown disaster ;)
So I was expecting that if I retrieved that bean from the Spring application context, that it is of type testDoubles.MemoryLogClient.
But Spring actually replaces the bean by a proxy (the retrieved bean is of type com.sun.proxy.$Proxy) and to make things worse, overrides the toString() method so that it reports type testDoubles.MemoryLogClient.
I.e. in my debug logs I see that the object reports to be of the correct type, but an assignment to a variable of the same type fails with a ClassCastException.
Yet another way Spring makes a developers life really hard...
Oh, by the way, the IMHO simplest solution is to extract an interface (in my case from testDoubles.MemoryLogClient) and assign the retrieved bean to a variable that has this interface as type.
But you will find much more complicated solutions on the interwebs (such as stackoverflow.com) that suggest to use AOP, which will convert this problem into a full blown disaster ;)
Montag, 15. September 2014
demotiviert im Motivationsseminar - irgendetwas läuft hier schief...
demotiviert im Motivationsseminar - irgendetwas läuft hier schief... #blog
— Andreas J. Resch (@andreasjresch) September 15, 2014
Sonntag, 14. September 2014
Freitag, 12. September 2014
Mittwoch, 10. September 2014
Dienstag, 9. September 2014
Sonntag, 7. September 2014
Samstag, 6. September 2014
Freitag, 5. September 2014
Mittwoch, 3. September 2014
"It’s a pity some people still build important apps in PHP and Spring" [Tim Bray] https://t.co/iAPZRNBJS5
"It’s a pity some people still build important apps in PHP and Spring" [Tim Bray] https://t.co/iAPZRNBJS5 #blog
— Andreas J. Resch (@andreasjresch) September 2, 2014
Dienstag, 2. September 2014
Montag, 1. September 2014
Abonnieren
Kommentare (Atom)