Now that I’ve had a chance to work with both Java and .NET generics, I must admit I like the runtime presence of generics in .NET. Java generics exist only to enhance compiler time checks and type erasure removes these from the binary class file — in all but metadata form for IDE code completion. […]
Viridium.ro
coding
Generic Parameter Antipattern
GWT, GWT-Ext and MIME/Multipart Forms
When trying to create a simple GWT-Ext file upload (GWT-Ext 2.0.4, Ext-JS 2.0.2, GWT 1.5 Windows), GWT reports the following hosted mode error upon form submit:
com.google.gwt.dev.shell.HostedModeException: Expected primitive type int; actual value was undefined
According to some reports, older versions of GWT display a slightly different error message.
com.google.gwt.dev.shell.HostedModeException: Calling method ‘onActionComplete’: JavaScript undefined, expected int
This error […]
Object Identity and the Collection Framework
Scenario: You place a collection of objects in a JCF collection for later use. You are working with a closed group of objects and wish to infer object equality by means of object identity.
Problem: The objects may implement equals and hashCode specifically and the JCF classes make heavy use of these internally. You wish to […]
Programming Language Guidelines
The coder Mihai has switched back and forth between C# and Java a few times now. Whenever switching, you notice how your brain gets used to the conventions used hitherto… I just recently began work on yet another Java project and was being pounded with IDEA’s error highlights on the (lowercase) “string” variables. You get […]
C# var - Good or Bad?
Years ago, someone on Undernet’s #java was telling us that his Java methods followed an old C pattern: variable declarations at the top, code to initialize and use the variables down below. (Surprisingly similar to the var debate, isn’t it?) Is it good, or bad? Well, if variable names are cryptic enough that you can’t […]