NOISSUE discourage using java > 8 by sorting it below everything else

This commit is contained in:
Petr Mrázek 2017-09-26 19:16:46 +02:00
parent 1a38587877
commit 0595a00090

View File

@ -60,9 +60,18 @@ bool JavaVersion::operator<(const JavaVersion &rhs)
{
if(m_parseable && rhs.m_parseable)
{
if(m_major < rhs.m_major)
auto major = m_major;
auto rmajor = rhs.m_major;
// HACK: discourage using java 9
if(major > 8)
major = -major;
if(rmajor > 8)
rmajor = -rmajor;
if(major < rmajor)
return true;
if(m_major > rhs.m_major)
if(major > rmajor)
return false;
if(m_minor < rhs.m_minor)
return true;