Archiviert
13
0

Add version to stack traces, fix EnumWrappers in pre-1.8

Dieser Commit ist enthalten in:
Dan Mulloy 2015-08-09 12:53:27 -04:00
Ursprung 3166241397
Commit e6c87129bd
3 geänderte Dateien mit 21 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -84,7 +84,12 @@
<version>2.5</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<Main-Class>com.comphenix.protocol.Application</Main-Class>
<Implementation-Title>ProtocolLib</Implementation-Title>
<Implementation-Version>${project.version}${project.build.number}</Implementation-Version>
<Implementation-Vendor>dmulloy2</Implementation-Vendor>
</manifestEntries>
</archive>
<finalName>ProtocolLib</finalName>
</configuration>

Datei anzeigen

@ -330,9 +330,11 @@ public abstract class EnumWrappers {
}
private static void associate(Class<?> nativeClass, Class<?> wrapperClass, EquivalentConverter<?> converter) {
if (nativeClass != null) {
FROM_NATIVE.put(nativeClass, converter);
FROM_WRAPPER.put(wrapperClass, converter);
}
}
/**
* Retrieve the enum field with the given declaration index (in relation to the other enums).
@ -341,7 +343,11 @@ public abstract class EnumWrappers {
* @return The type of the enum field.
*/
private static Class<?> getEnum(Class<?> clazz, int index) {
try {
return FuzzyReflection.fromClass(clazz, true).getFieldListByType(Enum.class).get(index).getType();
} catch (Throwable ex) {
return null; // Unsupported in this version
}
}
public static Map<Class<?>, EquivalentConverter<?>> getFromNativeMap() {

Datei anzeigen

@ -84,7 +84,12 @@
<version>2.5</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<Main-Class>com.comphenix.protocol.Application</Main-Class>
<Implementation-Title>ProtocolLib</Implementation-Title>
<Implementation-Version>${project.version}${project.build.number}</Implementation-Version>
<Implementation-Vendor>dmulloy2</Implementation-Vendor>
</manifestEntries>
</archive>
<finalName>ProtocolLib</finalName>
<outputDirectory>../../target/</outputDirectory>