From: René J. <rvj...@xs...> - 2020-09-18 21:32:20
|
Hi Jeff, Thank you, that is the right thing to do. René. > On 18 Sep 2020, at 21:30, Jeff Hennick <Je...@je...> wrote: > > > René & Colin, > > I have just altered the compare stage so it does the type cast on its inputs. > > Jeff > >> On 9/18/2020 1:29 PM, ColinK wrote: >> Thanks Rene >> >> Turns out the problem was not in compare but in the stage prior to compare. It was outputting a java String response instead of a Rexx response. It is interesting that the prior stage (hostbyname, in this case) had always done this but only now did compare complain. I will get the updated version of hostbyname committed shortly. >> >> Cheers >> Colin >> >> On 2020-09-17 16:07, René Jansen wrote: >>> Hi Colin, >>> >>> You can put a Rexx in front of it; also, we need to look at sort to maybe convert it to Rexx only. >>> >>> René. >>> >>>> On 18 Sep 2020, at 00:16, ColinK <ibm...@im...> wrote: >>>> >>>> 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 >>>> >>>> <ojigobehihnhlgjj.png> >>>> >>>> >>>> The compare.nrx source around that spot is: >>>> >>>> <bifefgpdfoblncip.png> >>>> >>>> >>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> netrexx-pipelines mailing list >>>> net...@li... >>>> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines >> >> >> >> >> _______________________________________________ >> netrexx-pipelines mailing list >> net...@li... >> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |