Skip to content

Commit c2d2e6f

Browse files
authored
Address JavaDoc warnings (#28)
Signed-off-by: Dan Siwiec <daniel.siwiec@gmail.com>
1 parent d3b7f3b commit c2d2e6f

File tree

25 files changed

+110
-33
lines changed

25 files changed

+110
-33
lines changed

common-test/src/main/java/feast/common/it/BaseIT.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public ConsumerFactory<String, byte[]> testConsumerFactory() {
115115
/**
116116
* Truncates all tables in Database (between tests or flows). Retries on deadlock
117117
*
118-
* @throws SQLException
118+
* @throws SQLException when a SQL exception occurs
119119
*/
120120
public static void cleanTables() throws SQLException {
121121
Connection connection =
@@ -156,7 +156,12 @@ public static void cleanTables() throws SQLException {
156156
}
157157
}
158158

159-
/** Used to determine SequentialFlows */
159+
/**
160+
* Used to determine SequentialFlows
161+
*
162+
* @param testInfo test info
163+
* @return true if test is sequential
164+
*/
160165
public Boolean isSequentialTest(TestInfo testInfo) {
161166
try {
162167
testInfo.getTestClass().get().asSubclass(SequentialFlow.class);

common-test/src/main/java/feast/common/util/TestUtil.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public static void setupAuditLogger() {
4444

4545
/**
4646
* Compare if two Feature Table specs are equal. Disregards order of features/entities in spec.
47+
*
48+
* @param spec one spec
49+
* @param otherSpec the other spec
50+
* @return true if specs equal
4751
*/
4852
public static boolean compareFeatureTableSpec(FeatureTableSpec spec, FeatureTableSpec otherSpec) {
4953
spec =

common/src/main/java/feast/common/auth/credentials/GoogleAuthCredentials.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class GoogleAuthCredentials extends CallCredentials {
4545
*
4646
* @param options a map of options, Required unless specified: audience - Optional, Sets the
4747
* target audience of the token obtained.
48+
* @throws IOException if credentials are not available
4849
*/
4950
public GoogleAuthCredentials(Map<String, String> options) throws IOException {
5051
String targetAudience = options.getOrDefault("audience", "https://localhost");

common/src/main/java/feast/common/logging/AuditLogger.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public AuditLogger(LoggingProperties loggingProperties, BuildProperties buildPro
6565
/**
6666
* Log the handling of a Protobuf message by a service call.
6767
*
68+
* @param level log level
6869
* @param entryBuilder with all fields set except instance.
6970
*/
7071
public static void logMessage(Level level, MessageAuditLogEntry.Builder entryBuilder) {

common/src/main/java/feast/common/logging/entry/ActionAuditLogEntry.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
/** ActionAuditLogEntry records an action being taken on a specific resource */
2222
@AutoValue
2323
public abstract class ActionAuditLogEntry extends AuditLogEntry {
24-
/** The name of the action taken on the resource. */
24+
/** @return The name of the action taken on the resource. */
2525
public abstract String getAction();
2626

27-
/** The target resource of which the action was taken on. */
27+
/** @return The target resource of which the action was taken on. */
2828
public abstract LogResource getResource();
2929

3030
/**
@@ -34,6 +34,7 @@ public abstract class ActionAuditLogEntry extends AuditLogEntry {
3434
* @param version The version of Feast producing this {@link AuditLogEntry}.
3535
* @param resource The target resource of which the action was taken on.
3636
* @param action The name of the action being taken on the given resource.
37+
* @return log entry that records an action being taken on a specific resource
3738
*/
3839
public static ActionAuditLogEntry of(
3940
String component, String version, LogResource resource, String action) {

common/src/main/java/feast/common/logging/entry/AuditLogEntry.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,27 @@ public abstract class AuditLogEntry {
2929

3030
public final String application = "Feast";
3131

32-
/** The name of the Feast component producing this {@link AuditLogEntry} */
32+
/**
33+
* The name of the Feast component producing this {@link AuditLogEntry}
34+
*
35+
* @return the component
36+
*/
3337
public abstract String getComponent();
3438

35-
/** The version of Feast producing this {@link AuditLogEntry} */
39+
/**
40+
* The version of Feast producing this {@link AuditLogEntry}
41+
*
42+
* @return version
43+
*/
3644
public abstract String getVersion();
3745

3846
public abstract AuditLogEntryKind getKind();
3947

40-
/** Return a structured JSON representation of this {@link AuditLogEntry} */
48+
/**
49+
* Return a structured JSON representation of this {@link AuditLogEntry}
50+
*
51+
* @return structured JSON representation
52+
*/
4153
public String toJSON() {
4254
Gson gson = new Gson();
4355
return gson.toJson(this);

common/src/main/java/feast/common/logging/entry/MessageAuditLogEntry.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,35 @@
3434
/** MessageAuditLogEntry records the handling of a Protobuf message by a service call. */
3535
@AutoValue
3636
public abstract class MessageAuditLogEntry extends AuditLogEntry {
37-
/** Id used to identify the service call that the log entry is recording */
37+
/** @return Id used to identify the service call that the log entry is recording */
3838
public abstract UUID getId();
3939

40-
/** The name of the service that was used to handle the service call. */
40+
/** @return The name of the service that was used to handle the service call. */
4141
public abstract String getService();
4242

43-
/** The name of the method that was used to handle the service call. */
43+
/** @return The name of the method that was used to handle the service call. */
4444
public abstract String getMethod();
4545

46-
/** The request Protobuf {@link Message} that was passed to the Service in the service call. */
46+
/**
47+
* @return The request Protobuf {@link Message} that was passed to the Service in the service
48+
* call.
49+
*/
4750
public abstract Message getRequest();
4851

4952
/**
50-
* The response Protobuf {@link Message} that was passed to the Service in the service call. May
51-
* be an {@link Empty} protobuf no request could be collected due to an error.
53+
* @return The response Protobuf {@link Message} that was passed to the Service in the service
54+
* call. May be an {@link Empty} protobuf no request could be collected due to an error.
5255
*/
5356
public abstract Message getResponse();
5457

5558
/**
56-
* The authenticated identity that was assumed during the handling of the service call. For
57-
* example, the user id or email that identifies the user making the call. Empty if the service
58-
* call is not authenticated.
59+
* @return The authenticated identity that was assumed during the handling of the service call.
60+
* For example, the user id or email that identifies the user making the call. Empty if the
61+
* service call is not authenticated.
5962
*/
6063
public abstract String getIdentity();
6164

62-
/** The result status code of the service call. */
65+
/** @return The result status code of the service call. */
6366
public abstract Code getStatusCode();
6467

6568
@AutoValue.Builder

common/src/main/java/feast/common/logging/entry/TransitionAuditLogEntry.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
/** TransitionAuditLogEntry records a transition in state/status in a specific resource. */
2222
@AutoValue
2323
public abstract class TransitionAuditLogEntry extends AuditLogEntry {
24-
/** The resource which the state/status transition occured. */
24+
/** @return The resource which the state/status transition occured. */
2525
public abstract LogResource getResource();
2626

27-
/** The end status with the resource transition to. */
27+
/** @return The end status with the resource transition to. */
2828
public abstract String getStatus();
2929

3030
/**
@@ -35,6 +35,7 @@ public abstract class TransitionAuditLogEntry extends AuditLogEntry {
3535
* @param version The version of Feast producing this {@link AuditLogEntry}.
3636
* @param resource the resource which the transtion occured
3737
* @param status the end status which the resource transitioned to.
38+
* @return log entry to record a transition in state/status in a specific resource
3839
*/
3940
public static TransitionAuditLogEntry of(
4041
String component, String version, LogResource resource, String status) {

common/src/main/java/feast/common/models/FeatureTable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class FeatureTable {
2525
* Accepts FeatureTableSpec object and returns its reference in String
2626
* "project/featuretable_name".
2727
*
28+
* @param project project name
2829
* @param featureTableSpec {@link FeatureTableSpec}
2930
* @return String format of FeatureTableReference
3031
*/
@@ -36,6 +37,7 @@ public static String getFeatureTableStringRef(String project, FeatureTableSpec f
3637
* Accepts FeatureReferenceV2 object and returns its reference in String
3738
* "project/featuretable_name".
3839
*
40+
* @param project project name
3941
* @param featureReference {@link FeatureReferenceV2}
4042
* @return String format of FeatureTableReference
4143
*/

common/src/main/java/feast/common/validators/OneOfStringValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class OneOfStringValidator implements ConstraintValidator<OneOfStrings, S
2929
/**
3030
* Initialize the OneOfStringValidator with a collection of allowed String values.
3131
*
32-
* @param constraintAnnotation
32+
* @param constraintAnnotation constraint annotation
3333
*/
3434
@Override
3535
public void initialize(OneOfStrings constraintAnnotation) {

0 commit comments

Comments
 (0)