Skip to content

Commit 5c06702

Browse files
author
moddingfox
committed
app/src/main/java/open/furaffinity/client/utilities/webClient.java: Fixed cookie null bug
app/build.gradle: version change
1 parent 5a21244 commit 5c06702

7 files changed

Lines changed: 18 additions & 15 deletions

File tree

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 29
5-
buildToolsVersion "29.0.3"
4+
compileSdkVersion 30
5+
buildToolsVersion "30.0.2"
66

77
defaultConfig {
88
applicationId "open.furaffinity.client"
99
minSdkVersion 26
1010
targetSdkVersion 29
11-
versionCode 26
12-
versionName "0.2.6"
11+
versionCode 27
12+
versionName "0.2.7"
1313

1414
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515
}

app/src/main/java/open/furaffinity/client/utilities/webClient.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,17 @@ private String getPageResponse(int responseCode, HttpURLConnection httpURLConnec
104104

105105
if (responseCode == HttpURLConnection.HTTP_OK || (!followRedirects && responseCode == HttpURLConnection.HTTP_MOVED_TEMP)) {
106106
List<String> cookies = httpURLConnection.getHeaderFields().get("set-cookie");
107-
for (String currentCookie : cookies) {
108-
try {
109-
Cookie cookie = Cookie.parse(HttpUrl.get(httpURLConnection.getURL().toURI()), currentCookie);
107+
if (cookies != null) {
108+
for (String currentCookie : cookies) {
109+
try {
110+
Cookie cookie = Cookie.parse(HttpUrl.get(httpURLConnection.getURL().toURI()), currentCookie);
110111

111-
if (cookie != null) {
112-
lastPageResponceCookies.add(cookie);
112+
if (cookie != null) {
113+
lastPageResponceCookies.add(cookie);
114+
}
115+
} catch (URISyntaxException e) {
116+
e.printStackTrace();
113117
}
114-
} catch (URISyntaxException e) {
115-
e.printStackTrace();
116118
}
117119
}
118120

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.1.1'
11+
classpath 'com.android.tools.build:gradle:4.2.0'
1212

1313

1414
// NOTE: Do not place your application dependencies here; they belong

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

0 commit comments

Comments
 (0)