[ 
https://issues.apache.org/jira/browse/HADOOP-16210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848764#comment-16848764
 ] 

Steve Loughran commented on HADOOP-16210:
-----------------------------------------

bq.  I could write my own Preconditions class which wouldn't be so brittle and 
which we could adopt in our code

this wouldn't be that hard. But I'd not give it the same name as 
Preconditions.checkArgument etc as it'd only be confusing. We'd need something 
like

{code}
T requireNonNull(T, varags)
T require(T, condition, varargs)

this.value = require(value, value > 10, "value too low %d", value);

T require(T condition, varargs)

String s = requireNonEmpty(string)  // combine the isNotEmpty with precondition
{code}

we could then also have one for return checking which would do checks iff -ea 
was set.
{code}
return checkResult(result, result != 0)
{code}

Be expensive to move over, but we could add them and then move those 
invocations where we are seeing this compilation mismatch. 

I do not have the time to do this; I'd help someone to define the new 
operations and we could rollout.

But really, long term, Guava on the CP is toxic.

> Update guava to 27.0-jre in hadoop-project trunk
> ------------------------------------------------
>
>                 Key: HADOOP-16210
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16210
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.3.0
>            Reporter: Gabor Bota
>            Assignee: Gabor Bota
>            Priority: Critical
>             Fix For: 3.3.0
>
>         Attachments: HADOOP-16210.001.patch, 
> HADOOP-16210.002.findbugsfix.wip.patch, HADOOP-16210.002.patch, 
> HADOOP-16210.003.patch
>
>
> com.google.guava:guava should be upgraded to 27.0-jre due to new CVE's found 
> CVE-2018-10237.
> This is a sub-task for trunk from HADOOP-15960 to track issues with that 
> particular branch.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to