Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ protected java.util.concurrent.CompletableFuture<T2> sendAsync() throws ClientEx
public T3 buildFromResponse(@Nonnull final T2 response) {
final List<com.microsoft.graph.options.Option> options = new java.util.ArrayList<com.microsoft.graph.options.Option>();
try {
final Object builder = this.collRequestBuilderClass
final Object builder = response.nextLink() == null ? null : this.collRequestBuilderClass
.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(response.nextLink(), getBaseRequest().getClient(), options);
final T3 page = (T3)this.collectionPageClass.getConstructor(response.getClass(), builder.getClass()).newInstance(response, response.nextLink() == null ? null : builder);
final T3 page = (T3)this.collectionPageClass.getConstructor(response.getClass(), this.collRequestBuilderClass).newInstance(response, builder);
return page;
} catch(IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.microsoft.graph.http;

import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.core.IBaseClient;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -61,7 +62,7 @@ public T5 buildRequest(@Nullable final java.util.List<? extends com.microsoft.gr
return collRequestClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrl(), getClient(), requestOptions);
} catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}

Expand All @@ -77,7 +78,7 @@ public T2 byId(@Nonnull final String id) {
return reqBuilderClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrlWithAdditionalSegment(id), getClient(), getOptions());
} catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package com.microsoft.graph.http;

import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.core.IBaseClient;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -70,7 +71,7 @@ public T8 references() {
.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrl() + "/$ref", getClient(), getOptions());
} catch(IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package com.microsoft.graph.http;

import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.core.IBaseClient;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -72,7 +73,7 @@ public T2 buildRequest(@Nullable final java.util.List<? extends com.microsoft.gr
return refRequestClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrl(), getClient(), requestOptions);
} catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package com.microsoft.graph.http;

import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.core.IBaseClient;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -78,7 +79,7 @@ public T2 buildRequest(@Nullable final java.util.List<? extends com.microsoft.gr
return wReferenceRequestClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrl(), getClient(), requestOptions);
} catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}

Expand All @@ -93,7 +94,7 @@ public T3 reference(){
return refRequestBuilderClass.getConstructor(String.class, IBaseClient.class, java.util.List.class)
.newInstance(getRequestUrl() + "/$ref", getClient(), getOptions());
} catch (IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
return null;
throw new ClientException("Could not find the required class", ex);
}
}
}