Skip to content

Conversation

@jeanbza
Copy link

@jeanbza jeanbza commented Mar 13, 2018

There's a lot about this I'm unsure about, since this is my first commit. So, sorry if a lot is wrong here.

Fixes #2321

@jeanbza jeanbza requested a review from pongad as a code owner March 13, 2018 00:18
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 13, 2018
Copy link
Contributor

@pongad pongad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the contrary, most things look right :)


private ColorUtil() {}

public static final Color convert(java.awt.Color c) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


private ColorUtil() {}

public static final Color convert(java.awt.Color c) {

This comment was marked as spam.


import com.google.privacy.dlp.v2beta1.Color;

public class ColorUtil {

This comment was marked as spam.

This comment was marked as spam.

.setGreen(c.getGreen())
.setRed(c.getRed())
.build();
}

This comment was marked as spam.

This comment was marked as spam.

@jeanbza
Copy link
Author

jeanbza commented Mar 14, 2018

@garrettjonesgoogle PTAL and lmk if anything else to fix up!

Color got = Colors.asDlpColor(java.awt.Color.GREEN);
Assert.assertEquals(got.getBlue(), 0, 0);
Assert.assertEquals(got.getGreen(), 255, 0);
Assert.assertEquals(got.getRed(), 0, 0);

This comment was marked as spam.

This comment was marked as spam.


private Colors() {}

public static final Color asDlpColor(java.awt.Color c) {

This comment was marked as spam.

This comment was marked as spam.

@jeanbza
Copy link
Author

jeanbza commented Mar 14, 2018

@garrettjonesgoogle PTAL

Copy link
Member

@garrettjonesgoogle garrettjonesgoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pongad pongad merged commit 4fbe331 into googleapis:master Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants