Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353156 - [JAXB] ClassCastException in test-type element
Summary: [JAXB] ClassCastException in test-type element
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RM (show other bugs)
Version: 5.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 15:27 EDT by Greg Watson CLA
Modified: 2011-08-01 21:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2011-07-26 15:27:30 EDT
When testing a value against an integer, TestImpl generates a ClassCastException:

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
	at java.lang.String.compareTo(String.java:92)
	at org.eclipse.ptp.rm.jaxb.control.internal.data.TestImpl.evaluateComparable(TestImpl.java:229)
	at org.eclipse.ptp.rm.jaxb.control.internal.data.TestImpl.evaluateLessThan(TestImpl.java:263)
	at org.eclipse.ptp.rm.jaxb.control.internal.data.TestImpl.doTest(TestImpl.java:127)
	at org.eclipse.ptp.rm.jaxb.control.internal.data.TargetImpl.postProcess(TargetImpl.java:224)
	at org.eclipse.ptp.rm.jaxb.control.internal.runnable.command.ConfigurableRegexTokenizer.postProcessTargets(ConfigurableRegexTokenizer.java:329)
	at org.eclipse.ptp.rm.jaxb.control.internal.runnable.command.ConfigurableRegexTokenizer.read(ConfigurableRegexTokenizer.java:394)
	at org.eclipse.ptp.rm.jaxb.control.internal.runnable.command.ConfigurableRegexTokenizer.run(ConfigurableRegexTokenizer.java:189)
	at java.lang.Thread.run(Thread.java:680)
	
The corresponding XML is:

				<target type="attribute">
					<match>
						<expression>ompi:version:full:[\d]+\.([\d]+).*</expression>
						<set field="name">
							<entry value="ompi_minor_version"/>
						</set>
						<set field="value">
							<entry valueGroup="1"/>
						</set>
						<set field="visible">
							<entry value="true"/>
						</set>
						<set field="readOnly">
							<entry value="true"/>
						</set>
					</match>
					<test op="LT">
						<value>#value</value>
						<value>7</value>
						<throw message="Only supports Open MPI 1.7 and later"/>
					</test>
				</target>
Comment 1 Albert L. Rossi CLA 2011-08-01 21:10:05 EDT
Done.  Committed to 5_0 and HEAD.