[JIRA] (JENKINS-49826) Incorrect and confusing compilation of sets with custom types

2018-03-07 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer assigned an issue to Andrew Bayer  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49826  
 
 
  Incorrect and confusing compilation of sets with custom types   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Assignee: 
 Andrew Bayer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49826) Incorrect and confusing compilation of sets with custom types

2018-03-07 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-49826  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Incorrect and confusing compilation of sets with custom types   
 

  
 
 
 
 

 
 Interesting - will investigate.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49826) Incorrect and confusing compilation of sets with custom types

2018-03-01 Thread mko...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mike Kobit created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49826  
 
 
  Incorrect and confusing compilation of sets with custom types   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2018-03-01 18:35  
 
 
Environment: 
 Jenkins version: 2.89.4  Pipeline (workflow-aggregator) => 2.5  Pipeline: API (workflow-api) => 2.26  Pipeline: Basic Steps (workflow-basic-steps) => 2.6  Pipeline: Groovy (workflow-cps) => 2.45  Pipeline: Job (workflow-job) => 2.17  Pipeline: Multibranch (workflow-multibranch) => 2.17  Pipeline: Nodes and Processes (workflow-durable-task-step) => 2.19  Pipeline: SCM Step (workflow-scm-step) => 2.6  Pipeline: Shared Groovy Libraries (workflow-cps-global-lib) => 2.9  Pipeline: Step API (workflow-step-api) => 2.14  Pipeline: Supporting APIs (workflow-support) => 2.18  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Mike Kobit  
 

  
 
 
 
 

 
 First, create a pipeline job with this pipeline that contains a class definition: 

 

class Data implements Serializable {
  final String string
  Data(final String string) {
  this.string = Objects.requireNonNull(string)
  }

  boolean equals(final other) {
if (this.is(other)) {
return true
}
if (getClass() != other.class) {
return false
}

final Data that = (Data) other
return string == that.string
  }

  int hashCode() {
return string.hashCode()
  }
}

final d1 = new Data('a')
final d2 = new Data('b')
final d3 = new Data('c')

final s1 = 'a'
final s2 = 'b'
final s3 = 'c'

final s0 = [s1, s2, s3]
echo "s1: ${s0.getClass()}"
final ss1 = [s1, s2, s3].toSet()
echo "ss1: ${ss1.getClass()}"
final Set s