[sip-comm-dev] Messages.java trivial code mod


#1

Hi Yana,

This is a very trivial thing.
In net.java.sip.communicator.impl.gui.i18n.Messages.java
at line 76, we have
        resourceString = MessageFormat.format(resourceString, params);
This code cause a warning during compilation on java > 1.4
I know that we are currently targeting 1.4 platform, but even in 1.4, the
signature of the method is
        static String format(String pattern, Object[] arguments)
So, replacing the line 76 with this one (simply add a cast to Object[])
        resourceString = MessageFormat.format(resourceString, (Object[]) params);
suppress the warning on java > 1.5 and stay conforming with 1.4

Yes all that only for this :slight_smile:

regards

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Sympho,

Nice catch! I have applied and committed your patch. I've also updated the Contributor's page.

Thanks!

Yana

Sympho wrote:

···

Hi Yana,

This is a very trivial thing.
In net.java.sip.communicator.impl.gui.i18n.Messages.java
at line 76, we have
       resourceString = MessageFormat.format(resourceString, params);
This code cause a warning during compilation on java > 1.4
I know that we are currently targeting 1.4 platform, but even in 1.4, the
signature of the method is
       static String format(String pattern, Object[] arguments)
So, replacing the line 76 with this one (simply add a cast to Object[])
       resourceString = MessageFormat.format(resourceString, (Object[]) params);
suppress the warning on java > 1.5 and stay conforming with 1.4

Yes all that only for this :slight_smile:

regards

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net