Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
a6c11767
Commit
a6c11767
authored
Feb 18, 2015
by
Tim Olshansky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #46 from roanosullivan/master
Fixes for issues #44 and #45
parents
0dee5396
14b8c6ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
pom.xml
pom.xml
+16
-2
GitlabHTTPRequestor.java
src/main/java/org/gitlab/api/http/GitlabHTTPRequestor.java
+9
-0
GitlabAccessLevel.java
src/main/java/org/gitlab/api/models/GitlabAccessLevel.java
+3
-0
No files found.
pom.xml
View file @
a6c11767
...
...
@@ -68,12 +68,12 @@
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-core-asl
</artifactId>
<version>
1.9.
9
</version>
<version>
1.9.
13
</version>
</dependency>
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.
9
</version>
<version>
1.9.
13
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
...
...
@@ -129,6 +129,20 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.4
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<phase>
verify
</phase>
<goals>
<goal>
jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
src/main/java/org/gitlab/api/http/GitlabHTTPRequestor.java
View file @
a6c11767
...
...
@@ -341,11 +341,20 @@ public class GitlabHTTPRequestor {
}
}
};
// Added per https://github.com/timols/java-gitlab-api/issues/44
HostnameVerifier
nullVerifier
=
new
HostnameVerifier
()
{
@Override
public
boolean
verify
(
String
hostname
,
SSLSession
session
)
{
return
true
;
}
};
try
{
SSLContext
sc
=
SSLContext
.
getInstance
(
"SSL"
);
sc
.
init
(
null
,
trustAllCerts
,
new
java
.
security
.
SecureRandom
());
HttpsURLConnection
.
setDefaultSSLSocketFactory
(
sc
.
getSocketFactory
());
// Added per https://github.com/timols/java-gitlab-api/issues/44
HttpsURLConnection
.
setDefaultHostnameVerifier
(
nullVerifier
);
}
catch
(
Exception
e
)
{
// Ignore it
}
...
...
src/main/java/org/gitlab/api/models/GitlabAccessLevel.java
View file @
a6c11767
package
org
.
gitlab
.
api
.
models
;
import
org.codehaus.jackson.annotate.JsonCreator
;
public
enum
GitlabAccessLevel
{
Guest
(
10
),
...
...
@@ -14,6 +15,8 @@ public enum GitlabAccessLevel {
this
.
accessValue
=
accessValue
;
}
// http://fasterxml.github.io/jackson-annotations/javadoc/2.2.0/index.html?com/fasterxml/jackson/annotation/JsonCreator.html
@JsonCreator
public
static
GitlabAccessLevel
fromAccessValue
(
final
int
accessValue
)
throws
IllegalArgumentException
{
for
(
final
GitlabAccessLevel
gitlabAccessLevel
:
GitlabAccessLevel
.
values
())
{
if
(
gitlabAccessLevel
.
accessValue
==
accessValue
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment