Skip to content

Commit 5fa30cf

Browse files
committed
- port from v1
1 parent 84eb9f4 commit 5fa30cf

File tree

4 files changed

+70
-3
lines changed

4 files changed

+70
-3
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: PullRequestConflicting
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ master, dev ]
10+
pull_request:
11+
types: [synchronize]
12+
branches: [ master, dev ]
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
build:
18+
# The type of runner that the job will run on
19+
runs-on: ubuntu-latest
20+
21+
# Steps represent a sequence of tasks that will be executed as part of the job
22+
steps:
23+
- name: check if prs are dirty
24+
uses: eps1lon/actions-label-merge-conflict@releases/2.x
25+
if: env.LABELING_TOKEN != '' && env.LABELING_TOKEN != null
26+
id: check
27+
with:
28+
dirtyLabel: "conflicting"
29+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
30+
continueOnMissingPermissions: true
31+
commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.'
32+
commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.'
33+
env:
34+
LABELING_TOKEN: ${{secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Register your application by following the steps at [Register your app with the
4545

4646
An instance of the **GraphServiceClient** class handles building requests, sending them to the Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of `IAuthenticationProvider`, which can authenticate requests to Microsoft Graph.
4747

48-
For an example of authentication in a client application, see the [MSGraph SDK Android MSA Auth for Android Adapter](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter).
48+
For an example of authentication in a Java desktop client application, see the [Preview msgraph-sdk-java-auth](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter) and for an Android application see [Preview msgraph-sdk-android-auth](https://github.com/microsoftgraph/msgraph-sdk-android-auth).
4949

5050
### 2.3 Get a GraphServiceClient object
5151
After you have set the correct application ID and URL, you must get a **GraphServiceClient** object to make requests against the service. The SDK stores the account information for you, but when a user signs in for the first time, it invokes the UI to get the user's account information.

msgraph-beta-sdk-java.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
page_type: sample
2+
products:
3+
- office-365
4+
- ms-graph
5+
languages:
6+
- java
7+
extensions:
8+
contentType: sdks
9+
technologies:
10+
- Microsoft Graph
11+
- Microsoft identity platform
12+
platforms:
13+
- Android
14+
createdDate: '8/19/2020 10:20:15 AM'
15+
title: Microsoft Graph Beta SDK for Java
16+
description: Microsoft Graph Beta SDK for Java and Android

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public class DefaultHttpProvider implements IHttpProvider {
9898
private IConnectionConfig connectionConfig;
9999

100100
/**
101-
* Creates the DefaultHttpProvider
101+
* Creates the DefaultHttpProvider using a DefaultConnectionFactory.
102102
*
103103
* @param serializer the serializer
104104
* @param authenticationProvider the authentication provider
@@ -109,11 +109,28 @@ public DefaultHttpProvider(final ISerializer serializer,
109109
final IAuthenticationProvider authenticationProvider,
110110
final IExecutors executors,
111111
final ILogger logger) {
112+
this(serializer, authenticationProvider, executors, logger, new DefaultConnectionFactory());
113+
}
114+
115+
/**
116+
* Creates the DefaultHttpProvider
117+
*
118+
* @param serializer the serializer
119+
* @param authenticationProvider the authentication provider
120+
* @param executors the executors
121+
* @param logger the logger for diagnostic information
122+
* @param connectionFactory an IConnectionFactory to create outgoing connections
123+
*/
124+
public DefaultHttpProvider(final ISerializer serializer,
125+
final IAuthenticationProvider authenticationProvider,
126+
final IExecutors executors,
127+
final ILogger logger,
128+
final IConnectionFactory connectionFactory) {
112129
this.serializer = serializer;
113130
this.authenticationProvider = authenticationProvider;
114131
this.executors = executors;
115132
this.logger = logger;
116-
connectionFactory = new DefaultConnectionFactory();
133+
this.connectionFactory = connectionFactory;
117134
}
118135

119136
/**

0 commit comments

Comments
 (0)