From: ColinK <ibm...@im...> - 2020-09-17 22:16:16
|
Hello I have been updating my hostbyname.nrx stage so that it sorts the IP addresses returned (as DNS does not guarantee the same order in response). This will hopefully get around some false negative unit testing issues. It appears to be working fine but I am now running into an issue with compare. ==> Without compare stage Z:\GIT\netrexx-dev\bin>pipc hbntest00 pipe (hbntest00 ) literal dns.google example.com bogus.bogus one.one.one.one | split | hostbyname | console Z:\GIT\netrexx-dev\bin>java hbntest00 8.8.4.4 8.8.8.8 93.184.216.34 # Input record 3: Unable to determine IP address for bogus.bogus # 1.0.0.1 1.1.1.1 ==> With compare stage Z:\GIT\netrexx-dev\bin>pipc hbntest1 pipe (hbntest1 ) literal dns.google | hostbyname | console | compare: compare equal /PASS/ notequal /FAIL/ | console ? literal 8.8.4.4 8.8.8.8 | compare: Z:\GIT\netrexx-dev\bin>java hbntest1 8.8.4.4 8.8.8.8 java.lang.ClassCastException: java.lang.String cannot be cast to netrexx.lang.Rexx at org.netrexx.njpipes.stages.compare.run(*compare.java:128*) at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:60) at java.lang.Thread.run(Thread.java:748) Exiting due to uncaught Exception java.lang.String cannot be cast to netrexx.lang.Rexx Looking at \build\classes\org\netrexx\njpipes\stages\compare.java I see the following around line 128 The compare.nrx source around that spot is: If I am reading this correctly the issue appears to be around the variables "key" or "ds". Since their type is not "pre-declared" I presume they would default to type Rexx. Is that a fair statement? I guess I am not seeing how java.lang.String is coming into the picture. Am I traveling down the right path here or am totally out-to-lunch? :-) Thanks Colin |