This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
forked from linkedin/datahub-gma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable werror for dao-api. (linkedin#33)
- Loading branch information
John Plaisted
committed
Jan 14, 2021
1 parent
86925c7
commit 59bad03
Showing
13 changed files
with
116 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
dao-api/src/main/java/com/linkedin/metadata/dao/equality/AlwaysFalseEqualityTester.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
package com.linkedin.metadata.dao.equality; | ||
|
||
import com.linkedin.data.template.DataTemplate; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import javax.annotation.Nonnull; | ||
|
||
|
||
/** | ||
* A {@link EqualityTester} that always returns false. | ||
*/ | ||
public class AlwaysFalseEqualityTester<T extends DataTemplate> implements EqualityTester<T> { | ||
public class AlwaysFalseEqualityTester<T extends RecordTemplate> implements EqualityTester<T> { | ||
private static final AlwaysFalseEqualityTester<?> INSTANCE = new AlwaysFalseEqualityTester<>(); | ||
|
||
/** | ||
* Creates a new instance of {@link AlwaysFalseEqualityTester}. | ||
* Returns the singleton instance of {@link AlwaysFalseEqualityTester}. | ||
*/ | ||
public static <CLASS extends DataTemplate> AlwaysFalseEqualityTester<CLASS> newInstance() { | ||
return new AlwaysFalseEqualityTester<>(); | ||
@SuppressWarnings("unchecked") | ||
public static <T extends RecordTemplate> AlwaysFalseEqualityTester<T> instance() { | ||
return (AlwaysFalseEqualityTester<T>) INSTANCE; | ||
} | ||
|
||
@Override | ||
public boolean equals(@Nonnull T o1, @Nonnull T o2) { | ||
public boolean equals(@Nonnull RecordTemplate o1, @Nonnull RecordTemplate o2) { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
dao-api/src/main/java/com/linkedin/metadata/dao/equality/EqualityTester.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.linkedin.metadata.dao.equality; | ||
|
||
import com.linkedin.data.template.DataTemplate; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import javax.annotation.Nonnull; | ||
|
||
|
||
/** | ||
* An interface for testing equality between two objects of the same type. | ||
*/ | ||
public interface EqualityTester<T extends DataTemplate> { | ||
public interface EqualityTester<T extends RecordTemplate> { | ||
|
||
boolean equals(@Nonnull T o1, @Nonnull T o2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.