Skip to content

Commit

Permalink
Update Apache Commons Lang lib version (#909)
Browse files Browse the repository at this point in the history
Issue: 202088
  • Loading branch information
iroqueta authored Nov 6, 2024
1 parent 4019209 commit 610d928
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 35 deletions.
8 changes: 2 additions & 6 deletions android/src/main/java/com/genexus/util/GxJsonReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;

import org.apache.commons.lang.CharEncoding;
import java.nio.charset.StandardCharsets;

import com.genexus.internet.StringCollection;
import com.google.gson.stream.JsonReader;
Expand All @@ -14,11 +14,7 @@ public class GxJsonReader {
private JsonReader reader;

public GxJsonReader(InputStream stream) {
try {
reader = new JsonReader(new InputStreamReader(stream, CharEncoding.UTF_8));
} catch (UnsupportedEncodingException e) {
//TODO
}
reader = new JsonReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
}

public boolean readBeginArray() {
Expand Down
10 changes: 5 additions & 5 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/com/genexus/BaseProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.genexus.diagnostics.core.ILogger;
import com.genexus.diagnostics.core.LogManager;
import com.genexus.xml.XMLReader;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.genexus.GXSmartCacheProvider.DataUpdateStatus;
import com.genexus.common.classes.AbstractGXFile;
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/com/genexus/CommonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.text.*;
import java.util.*;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.lang.reflect.*;
import java.security.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import java.util.*;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.genexus.ModelContext;
import com.genexus.common.interfaces.SpecificImplementation;
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/com/genexus/xml/XMLWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.genexus.CommonUtil;
import java.util.*;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.genexus.cloud.serverless.model.EventMessageResponse;
import com.genexus.cloud.serverless.model.EventMessages;
import com.genexus.db.DynamicExecute;
import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.lang3.NotImplementedException;

import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.List;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.azure.cosmos.CosmosAsyncDatabase;
import com.azure.cosmos.CosmosClientBuilder;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.sql.ResultSet;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.genexus.db.dynamodb;

import com.genexus.db.service.ServiceConnection;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
Expand Down
2 changes: 1 addition & 1 deletion gxmail/src/main/java/com/genexus/internet/SMTPSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.genexus.diagnostics.core.ILogger;
import com.genexus.diagnostics.core.LogManager;
import org.apache.commons.codec.binary.Base64OutputStream;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.genexus.CommonUtil;
import com.genexus.common.interfaces.SpecificImplementation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.genexus.diagnostics.core.LogManager;
import com.genexus.messaging.queue.SimpleMessageQueue;
import com.genexus.services.ServiceConfigurationException;
import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.lang3.NotImplementedException;


public class AzureQueueFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.genexus.security.web;
import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.lang3.NotImplementedException;

import com.genexus.internet.IGxJSONAble;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Map;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.genexus.diagnostics.core.ILogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import java.util.Date;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;

import json.org.json.IJsonFormattable;
import json.org.json.JSONException;
Expand All @@ -22,12 +23,12 @@ public class WebSecureToken extends SecureToken {

private JSONObject _jObj = new JSONObject();

public WebSecureToken(){
_expiration = org.apache.commons.lang.time.DateUtils.addDays(new Date(), TOKEN_DAYS_EXPIRATION);
public WebSecureToken(){
_expiration = DateUtils.addDays(new Date(), TOKEN_DAYS_EXPIRATION);
}

public WebSecureToken(String pgmName, String issuer, String value) {
_expiration = org.apache.commons.lang.time.DateUtils.addDays(new Date(), TOKEN_DAYS_EXPIRATION);
_expiration = DateUtils.addDays(new Date(), TOKEN_DAYS_EXPIRATION);
_pgmName = pgmName;
_value = value;
_issuer = issuer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Date;

import com.genexus.GXutil;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;

import com.genexus.security.web.SecureTokenHelper.SecurityMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
import java.util.Map;
import java.util.UUID;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.Validate;
import org.apache.commons.lang3.Validate;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.genexus.webpanels;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import com.genexus.*;
import com.genexus.configuration.ConfigurationManager;
Expand Down
2 changes: 1 addition & 1 deletion gxweb/src/main/java/com/genexus/webpanels/GXWebPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import json.org.json.JSONArray;
import json.org.json.JSONException;
import json.org.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

class DataIntegrityException extends Exception
{
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/com/genexus/GXutil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.genexus.util.*;

import json.org.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

public final class GXutil
{
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/com/genexus/PrivateUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static String checkFileNameLength(String baseDir, String fileName, String
int pathLength;
int fileNameLength = fileName.length();
int extensionLength = extension.length();
if (org.apache.commons.lang.SystemUtils.IS_OS_WINDOWS)
if (isWindowsPlatform())
{
pathLength = baseDir.length() + fileNameLength + extensionLength;
if (pathLength > 260)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.genexus.fileupload.IFileItemIterator;
import com.genexus.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;

import com.genexus.internet.GXNavigationHelper;
Expand Down

0 comments on commit 610d928

Please sign in to comment.