NETREXX-145 Issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NETREXX-145 Issue

Jason Martin
Is this good enough to close https://kenai.com/jira/browse/NETREXX-145 in Rexx.nrx?

  /** Return a hashcode for the value.
      */
  method hashCode returns int
    if chars=null then chars=layout()
    if chars.length=0 then hash=0
    else do
        sb=StringBuffer(chars.length)
        j=chars.length-1
        loop i=0 to j
            sb.append(chars[i])
        end i
        tmp=sb.toString()
        hash=tmp.hashCode
    end
    return hash

I have not built or tested.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: NETREXX-145 Issue

rvjansen
Hi Jason,

thanks!

I had to add () to tmp.hashCode

It is in my branch and I will test with it.

best regards,

René.
On 30 Jan 2017, at 08:12, Jason Martin <[hidden email]> wrote:

Is this good enough to close https://kenai.com/jira/browse/NETREXX-145 in Rexx.nrx?

  /** Return a hashcode for the value.
      */
  method hashCode returns int
    if chars=null then chars=layout()
    if chars.length=0 then hash=0
    else do
        sb=StringBuffer(chars.length)
        j=chars.length-1
        loop i=0 to j
            sb.append(chars[i])
        end i
        tmp=sb.toString()
        hash=tmp.hashCode
    end
    return hash

I have not built or tested.
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/