NOISSUE discourage using java > 8 by sorting it below everything else
This commit is contained in:
parent
1a38587877
commit
0595a00090
@ -60,9 +60,18 @@ bool JavaVersion::operator<(const JavaVersion &rhs)
|
|||||||
{
|
{
|
||||||
if(m_parseable && rhs.m_parseable)
|
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;
|
return true;
|
||||||
if(m_major > rhs.m_major)
|
if(major > rmajor)
|
||||||
return false;
|
return false;
|
||||||
if(m_minor < rhs.m_minor)
|
if(m_minor < rhs.m_minor)
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user