Skip to content

Commit 77eedbb

Browse files
committed
Fix some nit
1 parent 34165d5 commit 77eedbb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

polaris-core/src/main/java/org/apache/polaris/core/rest/PolarisEndpoints.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.apache.polaris.core.context.CallContext;
2626

2727
public class PolarisEndpoints {
28+
// Generic table endpoints
2829
public static final Endpoint V1_LIST_GENERIC_TABLES =
2930
Endpoint.create("GET", PolarisResourcePaths.V1_GENERIC_TABLES);
3031
public static final Endpoint V1_LOAD_GENERIC_TABLE =
@@ -42,6 +43,7 @@ public class PolarisEndpoints {
4243
.add(V1_LOAD_GENERIC_TABLE)
4344
.build();
4445

46+
// Policy store endpoints
4547
public static final Endpoint V1_LIST_POLICIES =
4648
Endpoint.create("GET", PolarisResourcePaths.V1_POLICIES);
4749
public static final Endpoint V1_CREATE_POLICY =

service/common/src/main/java/org/apache/polaris/service/catalog/policy/PolicyCatalogAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Response dropPolicy(
159159
PolicyIdentifier identifier = new PolicyIdentifier(ns, RESTUtil.decodeString(policyName));
160160
PolicyCatalogHandler handler = newHandlerWrapper(securityContext, prefix);
161161
handler.dropPolicy(identifier, detachAll != null && detachAll);
162-
return Response.status(Response.Status.NO_CONTENT).build();
162+
return Response.noContent().build();
163163
}
164164

165165
@Override
@@ -174,7 +174,7 @@ public Response attachPolicy(
174174
PolicyIdentifier identifier = new PolicyIdentifier(ns, RESTUtil.decodeString(policyName));
175175
PolicyCatalogHandler handler = newHandlerWrapper(securityContext, prefix);
176176
handler.attachPolicy(identifier, attachPolicyRequest);
177-
return Response.status(Response.Status.NO_CONTENT).build();
177+
return Response.noContent().build();
178178
}
179179

180180
@Override
@@ -189,7 +189,7 @@ public Response detachPolicy(
189189
PolicyIdentifier identifier = new PolicyIdentifier(ns, RESTUtil.decodeString(policyName));
190190
PolicyCatalogHandler handler = newHandlerWrapper(securityContext, prefix);
191191
handler.detachPolicy(identifier, detachPolicyRequest);
192-
return Response.status(Response.Status.NO_CONTENT).build();
192+
return Response.noContent().build();
193193
}
194194

195195
@Override

0 commit comments

Comments
 (0)