fix(maven): resolve Named Locks and proxy auth, add missing dependencies and improve types

This commit is contained in:
rick committed 2026-11-16 15:23:01 +08:00
1 parent cd6a4c70e7
commit 9d7e42eda8
52 files changed
+74 -5023

No files matched your search

@@ -116,8 +116,10 @@ public class BaseFile {
this.extra = new DbObject();
}
parameters.forEach((key, value) -> {
if (value.length > 0 && key.startsWith("extra.")) {
parameters.forEach((k, v) -> {
String key = (String) k;
String[] value = (String[]) v;
if (value != null && value.length > 0 && key.startsWith("extra.")) {
this.extra.put(key.substring(6), value.length == 1 ? value[0] : Arrays.asList(value));
}
@@ -42,7 +42,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
* @author MiDM Core Platform Team
*/
@Document
public class OtaFile extends BaseFile implements Comparable {
public class OtaFile extends BaseFile implements Comparable<OtaFile> {
/** Android Recovery 固件升级脚本入口 */
private static final String ENTRY_META_INF = "META-INF/com/";
private static final String ENTRY_UPDATE_SCRIPT = "META-INF/com/google/android/updater-script";
@@ -643,7 +643,7 @@ public class OtaFile extends BaseFile implements Comparable {
break;
case "display-id":
case "ro.build.display.id":
String curDisplayId = this.getDisplayId();
curDisplayId = this.getDisplayId();
if (Strings.isNullOrEmpty(curDisplayId) || !curDisplayId.equals(value)) {
this.setDisplayId(value);
}
@@ -52,7 +52,7 @@ public class SiteInfo {
return this.isEnabled() && !this.getRoles().isEmpty() && this.getRoles().contains(role);
}
public boolean hasRole(Collection roles) {
public boolean hasRole(Collection<String> roles) {
if (this.isEnabled() && !this.getRoles().isEmpty()) {
for(String role : roles) {
if (this.getRoles().contains(role)) {
@@ -72,7 +72,7 @@ public class SiteInfo {
}
public void setRoles(Set roles) {
public void setRoles(Set<String> roles) {
if (roles != null && !roles.isEmpty()) {
for(String role : roles) {
role = UserRole.toRole(role);
+5 -5
View File
@@ -35,7 +35,7 @@ public class User extends GeneralProfile {
serialize = false
)
private String password;
private List sites;
private List<SiteInfo> sites;
@Transient
private boolean isMultiSiteUser;
@Transient
@@ -172,7 +172,7 @@ public class User extends GeneralProfile {
this.siteInfo = siteInfo;
}
public List getSites() {
public List<SiteInfo> getSites() {
if (this.sites == null) {
this.sites = new ArrayList();
}
@@ -180,8 +180,8 @@ public class User extends GeneralProfile {
return this.sites;
}
public List getSiteUuids() {
return this.sites != null && !this.sites.isEmpty() ? (List)this.sites.stream().map((item) -> item.getSiteUuid()).collect(Collectors.toList()) : null;
public List<UUID> getSiteUuids() {
return this.sites != null && !this.sites.isEmpty() ? (List<UUID>)this.sites.stream().map(SiteInfo::getSiteUuid).collect(Collectors.toList()) : null;
}
public boolean clearUndefinedSites() {
@@ -201,7 +201,7 @@ public class User extends GeneralProfile {
return hasChanges;
}
public void setSites(List sites) {
public void setSites(List<SiteInfo> sites) {
this.sites = sites;
}