Skip to content

Commit 33814a2

Browse files
author
Pradithya Aria
committed
remove runtime exception from method signatures.
1 parent b292128 commit 33814a2

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

core/src/main/java/feast/core/service/SpecService.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ public SpecService(
7979
* @throws RetrievalException if any of the requested ids is not found
8080
* @throws IllegalArgumentException if the list of ids is empty
8181
*/
82-
public List<EntityInfo> getEntities(List<String> ids)
83-
throws RetrievalException, IllegalArgumentException {
82+
public List<EntityInfo> getEntities(List<String> ids) {
8483
if (ids.size() == 0) {
8584
throw new IllegalArgumentException("ids cannot be empty");
8685
}
@@ -98,7 +97,7 @@ public List<EntityInfo> getEntities(List<String> ids)
9897
* @return list of EntityInfos
9998
* @throws RetrievalException if retrieval fails
10099
*/
101-
public List<EntityInfo> listEntities() throws RetrievalException {
100+
public List<EntityInfo> listEntities() {
102101
return this.entityInfoRepository.findAll();
103102
}
104103

@@ -110,8 +109,7 @@ public List<EntityInfo> listEntities() throws RetrievalException {
110109
* @throws RetrievalException if any of the requested ids is not found
111110
* @throws IllegalArgumentException if the list of ids is empty
112111
*/
113-
public List<FeatureInfo> getFeatures(List<String> ids)
114-
throws RetrievalException, IllegalArgumentException {
112+
public List<FeatureInfo> getFeatures(List<String> ids) {
115113
if (ids.size() == 0) {
116114
throw new IllegalArgumentException("ids cannot be empty");
117115
}
@@ -129,7 +127,7 @@ public List<FeatureInfo> getFeatures(List<String> ids)
129127
* @return list of FeatureInfos
130128
* @throws RetrievalException if retrieval fails
131129
*/
132-
public List<FeatureInfo> listFeatures() throws RetrievalException {
130+
public List<FeatureInfo> listFeatures() {
133131
return this.featureInfoRepository.findAll();
134132
}
135133

@@ -141,8 +139,7 @@ public List<FeatureInfo> listFeatures() throws RetrievalException {
141139
* @throws RetrievalException if any of the requested ids is not found
142140
* @throws IllegalArgumentException if the list of ids is empty
143141
*/
144-
public List<FeatureGroupInfo> getFeatureGroups(List<String> ids)
145-
throws RetrievalException, IllegalArgumentException {
142+
public List<FeatureGroupInfo> getFeatureGroups(List<String> ids) {
146143
if (ids.size() == 0) {
147144
throw new IllegalArgumentException("ids cannot be empty");
148145
}
@@ -161,7 +158,7 @@ public List<FeatureGroupInfo> getFeatureGroups(List<String> ids)
161158
* @return list of FeatureGroupInfos
162159
* @throws RetrievalException if retrieval fails
163160
*/
164-
public List<FeatureGroupInfo> listFeatureGroups() throws RetrievalException {
161+
public List<FeatureGroupInfo> listFeatureGroups() {
165162
return this.featureGroupInfoRepository.findAll();
166163
}
167164

@@ -173,8 +170,7 @@ public List<FeatureGroupInfo> listFeatureGroups() throws RetrievalException {
173170
* @throws RetrievalException if any of the requested ids is not found
174171
* @throws IllegalArgumentException if the list of ids is empty
175172
*/
176-
public List<StorageInfo> getStorage(List<String> ids)
177-
throws RetrievalException, IllegalArgumentException {
173+
public List<StorageInfo> getStorage(List<String> ids) {
178174
if (ids.size() == 0) {
179175
throw new IllegalArgumentException("ids cannot be empty");
180176
}
@@ -192,7 +188,7 @@ public List<StorageInfo> getStorage(List<String> ids)
192188
* @return list of StorageInfos
193189
* @throws RetrievalException if retrieval fails
194190
*/
195-
public List<StorageInfo> listStorage() throws RetrievalException {
191+
public List<StorageInfo> listStorage() {
196192
return this.storageInfoRepository.findAll();
197193
}
198194

@@ -208,7 +204,7 @@ public List<StorageInfo> listStorage() throws RetrievalException {
208204
* @return registered FeatureInfo
209205
* @throws RegistrationException if registration fails
210206
*/
211-
public FeatureInfo applyFeature(FeatureSpec spec) throws RegistrationException {
207+
public FeatureInfo applyFeature(FeatureSpec spec) {
212208
try {
213209
FeatureInfo featureInfo = featureInfoRepository.findById(spec.getId()).orElse(null);
214210
Action action;
@@ -258,7 +254,7 @@ public FeatureInfo applyFeature(FeatureSpec spec) throws RegistrationException {
258254
* @return registered FeatureGroupInfo
259255
* @throws RegistrationException if registration fails
260256
*/
261-
public FeatureGroupInfo applyFeatureGroup(FeatureGroupSpec spec) throws RegistrationException {
257+
public FeatureGroupInfo applyFeatureGroup(FeatureGroupSpec spec) {
262258
try {
263259
FeatureGroupInfo featureGroupInfo =
264260
featureGroupInfoRepository.findById(spec.getId()).orElse(null);
@@ -311,7 +307,7 @@ public FeatureGroupInfo applyFeatureGroup(FeatureGroupSpec spec) throws Registra
311307
* @return registered EntityInfo
312308
* @throws RegistrationException if registration fails
313309
*/
314-
public EntityInfo applyEntity(EntitySpec spec) throws RegistrationException {
310+
public EntityInfo applyEntity(EntitySpec spec) {
315311
try {
316312
EntityInfo entityInfo = entityInfoRepository.findById(spec.getName()).orElse(null);
317313
Action action;
@@ -342,7 +338,7 @@ public EntityInfo applyEntity(EntitySpec spec) throws RegistrationException {
342338
* @return registered StorageInfo
343339
* @throws RegistrationException if registration fails
344340
*/
345-
public StorageInfo registerStorage(StorageSpec spec) throws RegistrationException {
341+
public StorageInfo registerStorage(StorageSpec spec) {
346342
try {
347343
StorageInfo storageInfo = storageInfoRepository.findById(spec.getId()).orElse(null);
348344
if (storageInfo != null) {

0 commit comments

Comments
 (0)