Skip to content

Commit

Permalink
Remove many but not all deprecated classes and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Nov 27, 2023
1 parent be8d21a commit 6f5b3f4
Show file tree
Hide file tree
Showing 77 changed files with 303 additions and 5,136 deletions.
50 changes: 5 additions & 45 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<artifactId>github-api2</artifactId>
<version>2.0-alpha1-SNAPSHOT</version>
<name>GitHub API for Java</name>
<url>https://github-api.kohsuke.org/</url>
Expand Down Expand Up @@ -118,9 +118,6 @@
<excludes>
<exclude>/org/kohsuke/github/extras/HttpClient*</exclude>
<exclude>/org/kohsuke/github/example/*</exclude>
<exclude>/org/kohsuke/github/extras/OkHttpConnector*</exclude>
<exclude>/org/kohsuke/github/extras/OkHttp3Connector*</exclude>
<exclude>/org/kohsuke/github/extras/okhttp3/ObsoleteUrlFactory*</exclude>
</excludes>
</configuration>
<executions>
Expand Down Expand Up @@ -175,20 +172,14 @@
<exclude>org.kohsuke.github.extras.HttpClientGitHubConnector.**</exclude>
<exclude>org.kohsuke.github.extras.HttpClientGitHubConnector</exclude>

<!-- Code implemented externally -->
<exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory.**</exclude>
<exclude>org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory</exclude>
<!-- V2.x changes -->
<exclude>org.kohsuke.github.connector.GitHubConnectorResponseHttpUrlConnectionAdapter</exclude>
<exclude>oorg.kohsuke.github.GHPerson.*</exclude>
<exclude>org.kohsuke.github.GHRepositorySearchBuilder.Fork</exclude>

<!-- Sample only -->
<exclude>org.kohsuke.github.example.*</exclude>

<!-- Deprecated -->
<exclude>org.kohsuke.github.extras.OkHttpConnector</exclude>
<exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude>
<exclude>org.kohsuke.github.EnforcementLevel</exclude>
<exclude>org.kohsuke.github.GHPerson.1</exclude>
<exclude>org.kohsuke.github.GHCompare.User</exclude>

<!-- Unbridged test changes -->
<exclude>org.kohsuke.github.GHCommit.GHAuthor</exclude>

Expand Down Expand Up @@ -600,20 +591,6 @@
<version>${okhttp3.version}</version>
<optional>true</optional>
</dependency>
<!-- This is the last version of okhttp3 that support UrlConnection -->
<!-- The class using this has been deprecated, this dependency can be remove when that class is. -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>3.12.3</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp-urlconnection</artifactId>
<version>2.7.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>wordnet-random-name</artifactId>
Expand Down Expand Up @@ -706,23 +683,6 @@
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>java11-urlconnection-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<classesDirectory>${project.basedir}/target/${project.artifactId}-${project.version}.jar</classesDirectory>
<useSystemClassLoader>false</useSystemClassLoader>
<excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine} -Dtest.github.connector=urlconnection</argLine>
<!-- Run some test passes with trace logging turned on -->
<systemPropertyVariables>
<java.util.logging.config.file>src/test/resources/test-trace-logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>slow-or-flaky-test</id>
<phase>integration-test</phase>
Expand Down
108 changes: 0 additions & 108 deletions src/main/java/org/kohsuke/github/AbuseLimitHandler.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/org/kohsuke/github/EnforcementLevel.java

This file was deleted.

84 changes: 0 additions & 84 deletions src/main/java/org/kohsuke/github/GHApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ public GHUser getOwner() {
return owner;
}

/**
* Sets owner.
*
* @param owner
* the owner
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setOwner(GHUser owner) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets name.
*
Expand All @@ -71,18 +59,6 @@ public String getSlug() {
return slug;
}

/**
* Sets name.
*
* @param name
* the name
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setName(String name) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets description.
*
Expand All @@ -92,18 +68,6 @@ public String getDescription() {
return description;
}

/**
* Sets description.
*
* @param description
* the description
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setDescription(String description) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets external url.
*
Expand All @@ -113,18 +77,6 @@ public String getExternalUrl() {
return externalUrl;
}

/**
* Sets external url.
*
* @param externalUrl
* the external url
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setExternalUrl(String externalUrl) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets events.
*
Expand All @@ -136,18 +88,6 @@ public List<GHEvent> getEvents() {
.collect(Collectors.toList());
}

/**
* Sets events.
*
* @param events
* the events
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setEvents(List<GHEvent> events) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets installations count.
*
Expand All @@ -157,18 +97,6 @@ public long getInstallationsCount() {
return installationsCount;
}

/**
* Sets installations count.
*
* @param installationsCount
* the installations count
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setInstallationsCount(long installationsCount) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets the html url.
*
Expand All @@ -187,18 +115,6 @@ public Map<String, String> getPermissions() {
return Collections.unmodifiableMap(permissions);
}

/**
* Sets permissions.
*
* @param permissions
* the permissions
* @deprecated Do not use this method. It was added due to incomplete understanding of Jackson binding.
*/
@Deprecated
public void setPermissions(Map<String, String> permissions) {
throw new RuntimeException("Do not use this method.");
}

/**
* Obtains all the installations associated with this app.
* <p>
Expand Down
Loading

0 comments on commit 6f5b3f4

Please sign in to comment.