Skip to content

Commit

Permalink
feat: Cleanup Dependencies to rely on Spring Dependencies Tree - Meed…
Browse files Browse the repository at this point in the history
…s-io/MIPs#57 (#1160)

Upgrade from Commons Lang to apache Lang 3
  • Loading branch information
boubaker authored Jan 12, 2024
1 parent 6674b13 commit 042803b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl;
import org.exoplatform.documents.entity.PublicDocumentAccessEntity;

import javax.persistence.NoResultException;
import javax.persistence.TypedQuery;
import jakarta.persistence.NoResultException;
import jakarta.persistence.TypedQuery;

public class PublicDocumentAccessDAO extends GenericDAOJPAImpl<PublicDocumentAccessEntity, Long> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import lombok.Data;
import org.exoplatform.commons.api.persistence.ExoEntity;

import javax.persistence.*;
import jakarta.persistence.*;
import java.io.Serializable;
import java.util.Date;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

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

import org.exoplatform.common.http.HTTPStatus;
import org.exoplatform.commons.ObjectAlreadyExistsException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import javax.jcr.version.VersionIterator;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.ObjectAlreadyExistsException;
Expand Down Expand Up @@ -783,7 +783,7 @@ public void renameDocument(long ownerId, String documentID, String title, Identi

Node parent = node.getParent();
String srcPath = node.getPath();
String destPath = (parent.getPath().equals(SLASH) ? org.apache.commons.lang.StringUtils.EMPTY : parent.getPath()).concat(SLASH).concat(name);
String destPath = (parent.getPath().equals(SLASH) ? org.apache.commons.lang3.StringUtils.EMPTY : parent.getPath()).concat(SLASH).concat(name);
if (!srcPath.equals(destPath)) {
node.getSession().getWorkspace().move(srcPath, destPath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.util.stream.Collectors;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public static String cleanName(String oldName) {
return cleanName(oldName, NodeTypeConstants.NT_FILE);
}
public static String cleanName(String oldName, String nodeType) {
if (org.apache.commons.lang.StringUtils.isEmpty(oldName)) return oldName;
if (org.apache.commons.lang3.StringUtils.isEmpty(oldName)) return oldName;
String extension = "" ;
if(nodeType.equals(NodeTypeConstants.NT_FILE) && oldName.lastIndexOf(".") > -1){
extension = oldName.substring(oldName.lastIndexOf("."));
Expand Down

0 comments on commit 042803b

Please sign in to comment.