Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rap-dev] BigDecimal constructor

Hi Igor,

we are aware of this issue but don't consider it a bug. In my opinion it is generally a bad idea to run on a JRE with a lower version number than the one that was used to compile against.

Nontheless, if this is a pain point for you, feel free to file a bug and we will consider adding explicit casts or whatever is necessary.

Regards
Rüdiger


On 01.02.2010 15:13, ipavl wrote:
Hi

Sometimes RAP developers use BigDecimal contructor with int argument. This
contructor is represented in java 1.5. There is another contructor:
BigDecimal(double value). And the compiler can resolve call of the
BigDecimal(int arg) as BigDecimal(double arg). Sometimes it can be helpful.
But this code fails if you will build RAP platform with java 1.5 (even if
you have configured compiler to use java 1.4 compiliance level) and execute
it using JRE 1.4.

I do not sure that it is a bug, but this may cause problems for RAP users
(if they will deside to rebuild RAP platform).

I found this problem where my app fails to start with such exception:

[2/1/10 14:24:51:145 YEKT] 0000003a WebApp        E   SRVE0026E: [Servlet
Error]-[equinoxbridgeservlet]: java.lang.NoSuchMethodError:
java.math.BigDecimal: method<init>(I)V not found
	at
org.eclipse.swt.internal.graphics.DefaultTextSizeStorage.setStoreSize(Unknow
n Source)
	at
org.eclipse.swt.internal.graphics.DefaultTextSizeStorage.<clinit>(Unknown
Source)
	at
org.eclipse.swt.internal.graphics.TextSizeStorageRegistry.obtain(Unknown
Source)

I found illegal using of BigDecimal constructor in serveral places:

org.eclipse.swt.internal.graphics.DefaultTextSizeStorage.setStoreSize(int)
org.eclipse.swt.internal.graphics.TextSizeProbeStore.createProbeResult(IProb
e, Point)
org.eclipse.swt.internal.graphics.TextSizeDetermination.internalExtent(Font,
String, int, int)

It is possible that there are several similar problems with other code.

Regards,
Igor

_______________________________________________
rap-dev mailing list
rap-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/rap-dev



Back to the top