Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove many but not all deprecated classes and methods #1757

Merged
merged 2 commits into from
Nov 30, 2023
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
52 changes: 7 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>
Comment on lines -4 to 5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting these changes into a new artifact and designating alpha1. No backward compatibility guarantees.

<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,19 +172,15 @@
<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>

<!-- Sample only -->
<exclude>org.kohsuke.github.example.*</exclude>
<!-- V2.x changes -->
<exclude>org.kohsuke.github.connector.GitHubConnectorResponseHttpUrlConnectionAdapter</exclude>
<exclude>org.kohsuke.github.GHRepositorySearchBuilder.Fork</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>

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

<!-- Unbridged test changes -->
<exclude>org.kohsuke.github.GHCommit.GHAuthor</exclude>
Expand Down Expand Up @@ -600,20 +593,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>
Comment on lines -603 to -616
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omg. At long last. Good bye.

<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>wordnet-random-name</artifactId>
Expand Down Expand Up @@ -706,23 +685,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