mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-23 19:16:14 +01:00
fix two smaller issues (#1774)
This commit is contained in:
parent
84cb541866
commit
c3dc00de05
@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.comphenix.protocol.utility;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* Represents a dynamic package and an arbitrary number of cached classes.
|
||||
@ -39,7 +39,7 @@ final class CachedPackage {
|
||||
public CachedPackage(String packageName, ClassSource source) {
|
||||
this.source = source;
|
||||
this.packageName = packageName;
|
||||
this.cache = new HashMap<>();
|
||||
this.cache = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ public final class MinecraftReflection {
|
||||
/**
|
||||
* Regular expression that matches a canonical Java class.
|
||||
*/
|
||||
private static final String CANONICAL_REGEX = "\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*";
|
||||
private static final String CANONICAL_REGEX = "(\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*\\.)+\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*";
|
||||
private static final String MINECRAFT_CLASS_NAME_REGEX = "net\\.minecraft\\." + CANONICAL_REGEX;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user