Community
Participate
Working Groups
Created attachment 201719 [details] patch to return empty enumeration The problem is that ResourceBundle#getKeys() contract is not honored appropriately because the method doesn't spec that a return value of null is allowed. Here's the exception from my application: java.lang.NullPointerException at java.util.ResourceBundle.handleKeySet(ResourceBundle.java:1715) at java.util.ResourceBundle.containsKey(ResourceBundle.java:1669) at com.bizerba.retail.validation.model.validation.internal.ModelValidationProvider$1.getMessage(ModelValidationProvider.java:105)
Thanks for the patch Tom.
Instead of creating a new inner class I prefer to use: return Collections.enumeration(Collections.EMPTY_LIST);
wrong milestone. I meant Juno :)
(In reply to comment #2) > Instead of creating a new inner class I prefer to use: > > return Collections.enumeration(Collections.EMPTY_LIST); Fine too - it was my first implementation too but this generates a warning and Collections.emptyList() is only available since 1.5 and IIRC 1.5 stuff is not supposed to be used, not? I could naturally add a suppress warning so if you want me to recreate the patch with the above I'm fine with it.
(In reply to comment #4) > (In reply to comment #2) > > Instead of creating a new inner class I prefer to use: > > > > return Collections.enumeration(Collections.EMPTY_LIST); > > Fine too - it was my first implementation too but this generates a warning and > Collections.emptyList() is only available since 1.5 and IIRC 1.5 stuff is not > supposed to be used, not? > > I could naturally add a suppress warning so if you want me to recreate the > patch with the above I'm fine with it. No need to create a patch I will use the above line with a suppress warning flag. Thanks.
Fixed in commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=c31d218de84897d1bc8b90d3c853716af3f965c2