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

@@ -8,7 +8,7 @@ import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
@Component
public class JsonElementConverter implements Converter {
public class JsonElementConverter implements Converter<String, JsonElement> {
public JsonElement convert(String source) {
try {
source = URLDecoder.decode(source, Charset.defaultCharset());
@@ -8,7 +8,7 @@ import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
@Component
public class JsonObjectConverter implements Converter {
public class JsonObjectConverter implements Converter<String, JsonObject> {
public JsonObject convert(String source) {
try {
source = URLDecoder.decode(source, Charset.defaultCharset());
@@ -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;
}
@@ -136,7 +136,7 @@ public class NewsMessageService extends BaseService {
this.messageLogService.deleteByNewsMessage(newsMessage);
}
public void delete(List newsMessage) {
public void delete(List<NewsMessage> newsMessage) {
List<UUID> uuids = (List)newsMessage.stream().map(NewsMessage::getUuid).collect(Collectors.toList());
Query query = Query.query(Criteria.where("_id").in(uuids));
this.mongoTemplate.remove(query, NewsMessage.class);
@@ -204,7 +204,7 @@ public class NewsMessageService extends BaseService {
this.sendNotification(mails, newsMessage);
}
private void sendNotification(Collection mails, NewsMessage message) {
private void sendNotification(Collection<UserMail> mails, NewsMessage message) {
Map<String, InternetAddress> recipients = (Map)mails.stream().collect(Collectors.toMap(UserMail::getEmail, (user) -> user.toAddress()));
List<InternetAddress> mailsTo = message.getMailsTo();
if (mailsTo != null && !mailsTo.isEmpty()) {
@@ -229,8 +229,8 @@ public class NewsMessageService extends BaseService {
}
}
private void sendMail(McMailSender sender, List addresses) {
for(List oneList : Lists.partition(addresses, 40)) {
private void sendMail(McMailSender sender, List<InternetAddress> addresses) {
for(List<InternetAddress> oneList : Lists.partition(addresses, 40)) {
sender.clearBcc();
sender.addBcc(oneList);
sender.send();
@@ -528,7 +528,7 @@ public class NewsMessageService extends BaseService {
ref.put("errorCode", error.getValue());
Set<String> ssnSet = null;
if (REPORT_ERROR.COLLECT_SSN.contains(error)) {
Set ssnSet = new HashSet(Arrays.asList(device.getSerialNo()));
ssnSet = new HashSet(Arrays.asList(device.getSerialNo()));
ref.put("device", new HashSet(ssnSet));
}
@@ -96,7 +96,7 @@ public class UserService extends BaseService {
this.mongoTemplate.updateMulti(query, update, User.class);
}
public List saveUsers(List users) {
public List<User> saveUsers(List<User> users) {
List<User> savedUsers = new ArrayList();
for(User user : users) {
@@ -134,17 +134,17 @@ public class DbObject extends Document {
for(String key : keys) {
Object value = dbObject.get(key);
if (value == null) {
Object var8 = new DbObject();
DbObject var8 = new DbObject();
dbObject.put(key, var8);
dbObject = var8;
} else if (value instanceof DbObject) {
dbObject = (DbObject)value;
} else if (value instanceof Map) {
Object var9 = new DbObject((Map)value);
DbObject var9 = new DbObject((Map)value);
dbObject.put(key, var9);
dbObject = var9;
} else {
Object var10 = new DbObject();
DbObject var10 = new DbObject();
dbObject.put(key, var10);
dbObject = var10;
}
@@ -157,7 +157,7 @@ public class DbObject extends Document {
if (clazz.equals(DbObject.class)) {
List<Object> list = super.getList(key, Object.class);
if (list != null) {
List<T> listDbObject = new ArrayList();
List listDbObject = new ArrayList();
list.forEach((item) -> {
if (item instanceof Map) {
listDbObject.add(new DbObject((Map)item));
@@ -172,7 +172,7 @@ public class DbObject extends Document {
} else if (clazz.equals(UUID.class)) {
List<Object> list = super.getList(key, Object.class);
if (list != null) {
List<T> listDbObject = new ArrayList();
List listDbObject = new ArrayList();
list.forEach((item) -> {
if (item instanceof UUID) {
listDbObject.add(item);
@@ -203,20 +203,20 @@ public class Vector2Svg {
}
private class Group {
private final List paths;
private final List<VectorPath> paths;
public Group(List paths) {
public Group(List<VectorPath> paths) {
this.paths = paths;
}
}
private class AndroidVectorDrawable {
private final List paths;
private final List groups;
private final List<VectorPath> paths;
private final List<Group> groups;
private final double height;
private final double width;
private AndroidVectorDrawable(List paths, List groups, double width, double height) {
private AndroidVectorDrawable(List<VectorPath> paths, List<Group> groups, double width, double height) {
this.paths = paths;
this.groups = groups;
this.height = height;
@@ -100,7 +100,7 @@ public class HwInfo {
BufferedReader bufferedReader = new BufferedReader(reader);
String line;
for(line = null; (line = bufferedReader.readLine()) != null && (Strings.isNullOrEmpty(line) || line.startsWith("IdentifyingNumber")); var6 = null) {
while ((line = bufferedReader.readLine()) != null && (Strings.isNullOrEmpty(line) || line.startsWith("IdentifyingNumber"))) {
}
if (line != null && line.length() >= 19) {