You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Felix Knecht <fe...@apache.org> on 2008/11/27 22:39:28 UTC
Re: svn commit: r721277 - in /directory/studio/trunk: connection-ui/src/main/resources/org/apache/directory/studio/connection/ui/widgets/
ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/
ldapbrowser-ui/src/main...
Hi Stefan
Why 'Use Object[] instead of int[]'?
Did I trapped into a Java6 trap?
Felix
seelmann@apache.org schrieb:
> Author: seelmann
> Date: Thu Nov 27 12:58:09 2008
> New Revision: 721277
>
> URL: http://svn.apache.org/viewvc?rev=721277&view=rev
> Log:
> o Some typos
> o Use 'Vergleichsregeln' as translation for matching rules
> o Use Object[] instead of int[] to bind parameters to messages
>
>
>
> Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
> URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java?rev=721277&r1=721276&r2=721277&view=diff
> ==============================================================================
> --- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java (original)
> +++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java Thu Nov 27 12:58:09 2008
> @@ -528,7 +528,7 @@
> otherMatchSection
> .setText( NLS
> .bind(
> - Messages.getString( "AttributeTypeDescriptionDetailsPage.OtherMatchingRulesCount" ), new int[] { otherMrdNames.size() } ) ); //$NON-NLS-1$
> + Messages.getString( "AttributeTypeDescriptionDetailsPage.OtherMatchingRulesCount" ), new Object[] { otherMrdNames.size() } ) ); //$NON-NLS-1$
> for ( String mrdName : otherMrdNames )
> {
Re: svn commit: r721277 - in /directory/studio/trunk: connection-ui/src/main/resources/org/apache/directory/studio/connection/ui/widgets/
ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/
ldapbrowser-ui/src/main...
Posted by Felix Knecht <fe...@apache.org>.
Stefan Seelmann schrieb:
> Hi Felix,
>
>> Why 'Use Object[] instead of int[]'?
>> Did I trapped into a Java6 trap?
>
> The NLS class has two relevant overloaded bind() methods:
> bind(String,Object) and
> bind(String,Object[])
>
> int[] is an Object, not an Object[], so the first method is used.
Thanks for explanation. I'm sorry to say that this sows clearly that I'm not verifiying all the translation and
externalizing stuff if done :-(.
I know I've done more like this ...
Thanks
Felix
>
> With int[] I just get the string representation of the array, see
> http://imagebin.ca/img/SifoEc.png
>
> Regards,
> Stefan
>
>
Re: svn commit: r721277 - in /directory/studio/trunk: connection-ui/src/main/resources/org/apache/directory/studio/connection/ui/widgets/
ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/
ldapbrowser-ui/src/main...
Posted by Stefan Seelmann <se...@apache.org>.
Hi Felix,
> Why 'Use Object[] instead of int[]'?
> Did I trapped into a Java6 trap?
The NLS class has two relevant overloaded bind() methods:
bind(String,Object) and
bind(String,Object[])
int[] is an Object, not an Object[], so the first method is used.
With int[] I just get the string representation of the array, see
http://imagebin.ca/img/SifoEc.png
Regards,
Stefan