Skip to content

Commit 5775460

Browse files
committed
- updates beta with latest fixes from v1
1 parent f2440b5 commit 5775460

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ If major functionality is being added, or there will need to be gestation time f
2222
Revisions of this nature will result in a 0.X.X change of the version number.
2323

2424
## Submit pull requests for model or request files
25-
You can revise code in the extension folders of these folders. See [Extending the Library](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Extending-the-Library) for more information on how to work with the generated parts of the library.
25+
26+
All the code of the current repository is being generated automatically by the [SDK generator](https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/) in which any change must be reflected.
2627

2728
## Add yourself as a contributor
2829

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@ For a general overview of how the SDK is designed, see [overview](https://github
107107

108108
For more detailed documentation, see:
109109

110-
* [Overview](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Overview)
111-
* [Extending the library](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Extending-the-Library)
112-
* [Handling Open Types, PATCH support with `null` values](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Working-with-Open-Types)
113-
* [Collections](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Working-with-Collections)
114-
* [Making custom requests](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Custom-Requests)
115-
* [Known issues](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Known-Issues)
110+
* [Overview](https://docs.microsoft.com/graph/overview)
111+
* [Collections](https://docs.microsoft.com/graph/sdks/paging)
112+
* [Making requests](https://docs.microsoft.com/graph/sdks/create-requests)
113+
* [Known issues](https://github.com/MicrosoftGraph/msgraph-sdk-java/issues)
116114
* [Contributions](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md)
117115

118116
## 5. Issues

Scripts/incrementMinorVersion.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ function Update-MinorVersion() {
5656
Update-TelemetryVersion -version $nextVersion -telemetryFilePath $telemetryFilePath
5757
Update-PackageVersion -version $nextVersion -propertiesFilePath $propertiesFilePath
5858
}
59-
Update-MinorVersion
59+
Update-MinorVersion

src/main/java/com/microsoft/graph/http/BaseCollectionPage.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// ------------------------------------------------------------------------------
22
// Copyright (c) 2017 Microsoft Corporation
3-
//
3+
//
44
// Permission is hereby granted, free of charge, to any person obtaining a copy
55
// of this software and associated documentation files (the "Software"), to deal
66
// in the Software without restriction, including without limitation the rights
77
// to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
88
// copies of the Software, and to permit persons to whom the Software is
99
// furnished to do so, subject to the following conditions:
10-
//
10+
//
1111
// The above copyright notice and this permission notice shall be included in
1212
// all copies or substantial portions of the Software.
13-
//
13+
//
1414
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1515
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,6 +26,7 @@
2626
import com.microsoft.graph.serializer.AdditionalDataManager;
2727
import com.microsoft.graph.serializer.ISerializer;
2828

29+
import java.util.ArrayList;
2930
import java.util.Collections;
3031
import java.util.List;
3132

@@ -68,7 +69,7 @@ public abstract class BaseCollectionPage<T1, T2 extends IRequestBuilder> impleme
6869
public BaseCollectionPage(final List<T1> pageContents, final T2 nextRequestBuilder) {
6970
// CollectionPages are never directly modifiable, either 'update'/'delete' the specific child or 'add' the new
7071
// object to the 'children' of the collection.
71-
this.pageContents = Collections.unmodifiableList(pageContents);
72+
this.pageContents = Collections.unmodifiableList(pageContents == null ? new ArrayList<T1>() : pageContents);
7273
requestBuilder = nextRequestBuilder;
7374
}
7475

src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ else if (fieldObject instanceof List) {
156156
final List<?> fieldObjectList = (List<?>) fieldObject;
157157
if (collectionJson != null && collectionJson.isJsonArray()) {
158158
final JsonArray rawJsonArray = (JsonArray) collectionJson;
159-
final Integer fieldObjectListSize = fieldObjectList.size();
160-
final Integer rawJsonArraySize = rawJsonArray.size();
159+
final int fieldObjectListSize = fieldObjectList.size();
160+
final int rawJsonArraySize = rawJsonArray.size();
161161
for (int i = 0; i < fieldObjectListSize && i < rawJsonArraySize; i++) {
162162
final Object element = fieldObjectList.get(i);
163163
if (element instanceof IJsonBackedObject) {
@@ -167,8 +167,9 @@ else if (fieldObject instanceof List) {
167167
}
168168
}
169169
}
170-
if (rawJsonArraySize != fieldObjectListSize)
170+
if (rawJsonArraySize != fieldObjectListSize) {
171171
logger.logDebug("rawJsonArray has a size of " + rawJsonArraySize + " and fieldObjectList of " + fieldObjectListSize);
172+
}
172173
}
173174
}
174175
// If the object is a valid Graph object, set its additional data

src/main/java/com/microsoft/graph/serializer/EnumSetSerializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class EnumSetSerializer {
4141
private final Gson gson;
4242
/**
4343
* Not available for instantiation
44+
* @param logger logger to use during serialization
4445
*/
4546
public EnumSetSerializer(final ILogger logger) {
4647
gson = new GsonBuilder().registerTypeAdapterFactory(new FallbackTypeAdapterFactory(logger)).create();

0 commit comments

Comments
 (0)