[JIRA] [extreme-feedback] (JENKINS-20768) Comparison method violates its general contract exception

2013-11-26 Thread tob...@tobiasen.dk (JIRA)














































Tobias Tobiasen
 created  JENKINS-20768


Comparison method violates its general contract exception















Issue Type:


Bug



Assignee:


emanuelez



Components:


extreme-feedback



Created:


26/Nov/13 2:09 PM



Description:


It get the stacktrace below sometimes. I have not found a clear pattern in when it happens.
However I have seen similar errors in other code running on JDK 7.
I am running 1.2.2

To me it looks like the selectComparator.compare in XFPanelView is wrong. It contains.

 // if build is null, show it on bottom of its class
 if ( buildA == null || buildB == null ){
 return  ( buildA == null ) ? 1 : 0;
 }

 // if building atm - show build on top of its class
 if ( buildA.isBuilding() || buildB.isBuilding() ){
 return ( buildA.isBuilding() ) ? 0 : 1;
 }

It does not follow the contract that says:
"The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. "

It should be changed to:

 // if build is null, show it on bottom of its class
 if ( buildA == null || buildB == null ){
 if (buildA == buildB) {
 	return 0;
 }
 return  ( buildA == null ) ? 1 : 0;
 }

 // if building atm - show build on top of its class
 if ( buildA.isBuilding() || buildB.isBuilding() ){
 if (buildA.isBuilding() == buildB.isBuilding()) {
 	return 0;
 } }
 return ( buildA.isBuilding() ) ? 0 : 1;
 } 


Status Code: 500
Exception: org.apache.commons.jelly.JellyTagException: file:/D:/JenkinsHome/plugins/xfpanel/WEB-INF/classes/maps/hudson/plugin/xfpanel/XFPanelView/maindisplay.jelly:23:53: j:invoke method sort threw exception: Comparison method violates its general contract!
Stacktrace:
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: file:/D:/JenkinsHome/plugins/xfpanel/WEB-INF/classes/maps/hudson/plugin/xfpanel/XFPanelView/maindisplay.jelly:23:53: j:invoke method sort threw exception: Comparison method violates its general contract!
	at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at 

[JIRA] [extreme-feedback] (JENKINS-20768) Comparison method violates its general contract exception

2013-11-26 Thread tob...@tobiasen.dk (JIRA)














































Tobias Tobiasen
 commented on  JENKINS-20768


Comparison method violates its general contract exception















A workaround is to add "-Djava.util.Arrays.useLegacyMergeSort=true" to the JVM at startup.

See 
http://stackoverflow.com/questions/7849539/comparison-method-violates-its-general-contract-java-7-only
http://stackoverflow.com/questions/15893487/compile-in-java-6-run-in-7-how-to-specify-uselegacymergesort



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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/groups/opt_out.


[JIRA] [xfpanel] (JENKINS-20749) Some jobs are missing in Available jobs multichoice window

2013-11-26 Thread tob...@tobiasen.dk (JIRA)














































Tobias Tobiasen
 commented on  JENKINS-20749


Some jobs are missing in Available jobs multichoice window















I have also seen this in v1.2.2 with jenkins 1.513.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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/groups/opt_out.


[JIRA] [xfpanel] (JENKINS-16094) Better Job filtering capabilities - make use of JobViewsFilterPlugin

2013-11-26 Thread tob...@tobiasen.dk (JIRA)












































 
Tobias Tobiasen
 edited a comment on  JENKINS-16094


Better Job filtering capabilities - make use of JobViewsFilterPlugin
















Excellent idea. I need this too.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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/groups/opt_out.


[JIRA] [xfpanel] (JENKINS-16094) Better Job filtering capabilities - make use of JobViewsFilterPlugin

2013-11-26 Thread tob...@tobiasen.dk (JIRA)














































Tobias Tobiasen
 commented on  JENKINS-16094


Better Job filtering capabilities - make use of JobViewsFilterPlugin















Excelent idea. I need this too.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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/groups/opt_out.