Skip to content

Commit 3569765

Browse files
authored
Upgrade dependencies (#67)
1 parent 4dd9703 commit 3569765

File tree

9 files changed

+45
-143
lines changed

9 files changed

+45
-143
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
* [Issue 49238](https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=49238): Fix so all command responses correctly decode as UTF-8.
66
* Add MoveRowsCommand to query
77
* Earliest compatible LabKey Server version: 24.1.0
8+
* Remove deprecated `GetDomainCommand`; use `GetDomainDetailsCommand` instead.
9+
* Remove deprecated method `RowsResponse.getRequiredVersion()`.
10+
* Deprecate `GetUsersCommand` methods `getIncludeDeactivated()` and `setIncludeDeactivated()`; use `getIncludeInactive()`
11+
and `setIncludeInactive()` instead.
12+
* Update Commons Logging, Gradle, Gradle Plugins, HttpClient, and HttpCore versions
13+
* Remove Hamcrest references (unused)
814

915
## version 6.0.0
1016
*Released*: 1 December 2023

build.gradle

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,6 @@ dependencies {
8282
implementation "commons-codec:commons-codec:${commonsCodecVersion}"
8383
}
8484

85-
configurations.all
86-
{ Configuration config ->
87-
resolutionStrategy {
88-
// force versions so we can remain consistent with what comes through transitively
89-
// in :server:modules:platform:api via jackson
90-
force "org.hamcrest:hamcrest-core:${hamcrestVersion}"
91-
force "org.hamcrest:hamcrest-library:${hamcrestVersion}"
92-
force "junit:junit:${junitVersion}"
93-
}
94-
}
95-
9685
jar {
9786
sourceCompatibility = project.sourceCompatibility
9887
targetCompatibility = project.targetCompatibility

gradle.properties

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@ artifactory_contextUrl=https://labkey.jfrog.io/artifactory
77
sourceCompatibility=17
88
targetCompatibility=17
99

10-
gradlePluginsVersion=1.43.1
10+
gradlePluginsVersion=2.0.0
1111

1212
commonsCodecVersion=1.16.0
13-
commonsLoggingVersion=1.2
13+
commonsLoggingVersion=1.3.0
1414

15-
hamcrestVersion=1.3
16-
17-
httpclient5Version=5.2.1
18-
httpcore5Version=5.2.3
15+
httpclient5Version=5.3
16+
httpcore5Version=5.2.4
1917

2018
jsonObjectVersion=20231013
2119

2220
junitVersion=4.13.2
2321

22+
# Obsolete? Switch to com.opencsv:opencsv 5.9? Or maybe just get rid of MS2SearchClient (only user)?
2423
opencsvVersion=2.3
2524

2625
#If iterating on the java client api and deploying it to a non-LabKey directory, uncomment and set this property (or set at command line),

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

src/org/labkey/remoteapi/Connection.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,6 @@ public Connection stopImpersonating() throws IOException, CommandException
391391
return this;
392392
}
393393

394-
@Deprecated // Will be removed soon. Use stopImpersonating() instead.
395-
public Connection stopImpersonate() throws IOException, CommandException
396-
{
397-
return stopImpersonating();
398-
}
399-
400394
CloseableHttpResponse executeRequest(HttpUriRequest request, Integer timeout) throws IOException, AuthenticationException
401395
{
402396
// Delegate authentication setup to CredentialsProvider

src/org/labkey/remoteapi/domain/GetDomainCommand.java

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/org/labkey/remoteapi/query/RowsResponse.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
*/
3535
abstract class RowsResponse extends CommandResponse
3636
{
37-
private final double _requiredVersion;
38-
3937
/**
4038
* Constructs a new RowsResponse given the specified text and status code.
4139
* @param text The response text.
@@ -47,22 +45,11 @@ abstract class RowsResponse extends CommandResponse
4745
RowsResponse(String text, int statusCode, String contentType, JSONObject json, HasRequiredVersion hasRequiredVersion)
4846
{
4947
super(text, statusCode, contentType, json);
50-
_requiredVersion = hasRequiredVersion.getRequiredVersion();
51-
fixupParsedData(_requiredVersion);
48+
double requiredVersion = hasRequiredVersion.getRequiredVersion();
49+
fixupParsedData(requiredVersion);
5250
caseInsensitizeRowMaps();
5351
}
5452

55-
/**
56-
* Returns the API version number required by the source command. This response returns data in a different format
57-
* depending on the required version
58-
* @return the requested API version number
59-
*/
60-
@Deprecated // Just needed for fixup -- exposing this outside the class seems unnecessary. TODO: Remove this in v6.0.0
61-
public double getRequiredVersion()
62-
{
63-
return _requiredVersion;
64-
}
65-
6653
/**
6754
* Returns the list of rows from the parsed response data. Note that numbers in the map values will be either of
6855
* type Double or type Long depending on the presence of a decimal point. The most reliable way to work with them
@@ -113,12 +100,12 @@ else if ("int".equalsIgnoreCase(type))
113100
}
114101

115102
// If no fields to fixup, just return
116-
if (dateFields.size() == 0 && floatFields.size() == 0 && intFields.size() == 0)
103+
if (dateFields.isEmpty() && floatFields.isEmpty() && intFields.isEmpty())
117104
return;
118105

119106
// If no rows, just return
120107
List<Map<String, Object>> rows = getRows();
121-
if (null == rows || rows.size() == 0)
108+
if (null == rows || rows.isEmpty())
122109
return;
123110

124111
// The selectRows.api returns dates in a very particular format so that JavaScript can parse them into actual

src/org/labkey/remoteapi/security/GetUsersCommand.java

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class GetUsersCommand extends GetCommand<GetUsersResponse>
2828
private int _groupId = -1;
2929
private String _name;
3030
private String _group;
31-
private Boolean _includeDeactivated;
31+
private boolean _includeInactive = false;
3232

3333
public GetUsersCommand()
3434
{
@@ -67,32 +67,44 @@ public void setGroup(String group)
6767
_group = group;
6868
}
6969

70-
/** @return the first part of the user name, useful for user name completion */
70+
/** @return the first part of the username, useful for username completion */
7171
public String getName()
7272
{
7373
return _name;
7474
}
7575

7676
/**
77-
* @param name The first part of the user name, useful for user name completion. If specified, only users whose
77+
* @param name The first part of the username, useful for username completion. If specified, only users whose
7878
* email address or display name starts with the value supplied will be returned.
7979
*/
8080
public void setName(String name)
8181
{
8282
_name = name;
8383
}
8484

85+
@Deprecated(forRemoval = true) // Remove in 7.0.0
86+
public Boolean getIncludeDeactivated()
87+
{
88+
return _includeInactive;
89+
}
90+
91+
@Deprecated(forRemoval = true) // Remove in 7.0.0
92+
public void setIncludeDeactivated(Boolean includeInactive)
93+
{
94+
_includeInactive = (null != includeInactive && includeInactive);
95+
}
96+
8597
/**
86-
* @return Flag to request Active user accounts only
98+
* @return Flag to request inactive users as well
8799
*/
88-
public Boolean includeDeactivated()
100+
public boolean getIncludeInactive()
89101
{
90-
return _includeDeactivated;
102+
return _includeInactive;
91103
}
92104

93-
public void setIncludeDeactivated(Boolean active)
105+
public void setIncludeInactive(boolean includeInactive)
94106
{
95-
_includeDeactivated = active;
107+
_includeInactive = includeInactive;
96108
}
97109

98110
@Override
@@ -111,9 +123,9 @@ protected Map<String, Object> createParameterMap()
111123
{
112124
params.put("name", _name);
113125
}
114-
if (_includeDeactivated != null)
126+
if (_includeInactive)
115127
{
116-
params.put("active", !includeDeactivated());
128+
params.put("active", false);
117129
}
118130
return params;
119131
}

0 commit comments

Comments
 (0)