Skip to content
Permalink
Browse files
Fix spelling
  • Loading branch information
PseudoKnight committed Apr 8, 2020
1 parent b1511e0 commit de11f40cc6938cd7ef473cf1545468e5ae1ac812
Show file tree
Hide file tree
Showing 102 changed files with 179 additions and 178 deletions.
@@ -54,7 +54,7 @@ All braceable statements MUST use braces, and newlines.
If you have more than 2 commits, please rebase, unless the commit has already
been reviewed, in which case new commits should remain separate. (This allows reviewers
to just see the changes in the new commits, instead of having to re-review all changes.)
Do not make formatting changes to unrelated code, unless the entire commit is *soley* formatting
Do not make formatting changes to unrelated code, unless the entire commit is *solely* formatting
changes. In general though, even that is discouraged, because the full commit needs to be reviewed
regardless, and it's far easier for a single individual to do global code cleanup tools, rather
than many individuals.
@@ -75,7 +75,7 @@ This will install the `mscript` program and add it to your path,
which can be used to start a REPL shell for quick tasks, execute a script file, or
easily run the commandline tools. On Windows, this also installs a PowerShell module,
which can be used with `Import-Module -Name MethodScript` and `Invoke-MethodScript`. On Windows,
you must reboot your system after installatation to use the `mscript` command in cmd.exe.
you must reboot your system after installation to use the `mscript` command in cmd.exe.
You can install MethodScript using the same jar that is used in the Minecraft server,
though two different environments are used, with separate folders for the CommandHelper
installation, and the MethodScript installation. You can symlink these folders together if you
@@ -9,7 +9,7 @@
<module name="Checker">
<property name="severity" value="error"/>

<!-- Supression filter to disable specified modules/checks for specified files -->
<!-- Suppression filter to disable specified modules/checks for specified files -->
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle_suppressions.xml"/>
<property name="optional" value="false"/>
@@ -532,7 +532,7 @@ public <T> Set<ClassMirror<T>> getClassesThatExtend(Class<T> superType) {
//just return all known classes here.
// Ugh, this double cast though. This is definitely safe, since
// everything extends Object in java, but to get the compiler to
// shut up, we have to supress warnings and double cast it.
// shut up, we have to suppress warnings and double cast it.
return (Set<ClassMirror<T>>) (Set<?>) getKnownClasses();
}
if(classSubtypeCache.containsKey(superType)) {
@@ -568,7 +568,7 @@ public boolean doesClassExtend(ClassMirror<?> subClass, Class<?> superClass) {
//Well, crap, more complicated. Ok, so, the list of supers
//can probably be walked up even further, so we need to find
//the supers of these (and make sure it's not in the ClassMirror
//cache, to avoid loading classes unneccessarily) and then load
//cache, to avoid loading classes unnecessarily) and then load
//the actual Class object for them. Essentially, this falls back
//to loading the class when it
//can't be found in the mirrors pool.
@@ -858,7 +858,7 @@ public Set<Class<?>> loadClassesWithAnnotation(Class<? extends Annotation> annot
} catch (NoClassDefFoundError e) {
if(IS_DEBUG) {
// This is tough. Normally, we really want to ignore this error, but during development, it can be
// a critical error to see to diagnose a very hard to find error. So we compromize here, and only
// a critical error to see to diagnose a very hard to find error. So we compromise here, and only
// print error details out while in debug mode.
System.err.println("While trying to process " + cm.toString() + ", an error occurred. It it"
+ " probably safe to ignore this error, but if you're debugging to figure out why an"
@@ -97,7 +97,7 @@ public boolean isSynthetic() {
* the class files, so Mirrors constructed with real Members will return 0 for this. Also note that due to the
* jvm specification, only lines with executable instructions contain values in the line number table. Therefore,
* things like empty methods will not be in the line number table at all, and thus will return line 0 for this
* value. Therefore, it is very important to not rely on this returning a useable value, and having a fallback
* value. Therefore, it is very important to not rely on this returning a usable value, and having a fallback
* mechanism if this returns 0. It's also important to note that this will not return the line number for the
* method itself, since that isn't an executable statement.
* @return
@@ -353,7 +353,7 @@ public FieldMirror getField(String name) throws NoSuchFieldException {

/**
* Returns the methods in this class. This traverses the parent Object
* heirarchy if the methods are apart of the visible interface, as well as
* hierarchy if the methods are apart of the visible interface, as well as
* private methods in this class itself.
*
* @return
@@ -402,7 +402,7 @@ public AbstractMethodMirror[] getAllMethods() {

/**
* Returns the method, given by name. This traverses the parent Object
* heirarchy if the methods are apart of the visible interface, as well as
* hierarchy if the methods are apart of the visible interface, as well as
* private methods in this class itself.
*
* @param name
@@ -420,7 +420,7 @@ public MethodMirror getMethod(String name, Class<?>... params) throws NoSuchMeth

/**
* Returns the method, given by name. This traverses the parent Object
* heirarchy if the methods are apart of the visible interface, as well as
* hierarchy if the methods are apart of the visible interface, as well as
* private methods in this class itself.
*
* @param name
@@ -619,7 +619,7 @@ public boolean equals(Object obj) {
public List<AbstractMethodMirror> methods = new ArrayList<>();
/**
* Maps inherited classes to the generic parameters passed along to the
* inhereted class. For instance, if we have {@code class Base implements
* inherited class. For instance, if we have {@code class Base implements
* A<Integer, Long>, B<String> {...}} then this object would contain {A:
* [Integer, Long], B: [String]}
*/
@@ -79,7 +79,7 @@ public final class ElementSignature implements Serializable {
*/
public static ElementSignature GetSignature(String signature) {
// Inner non-static classes are not currently handled, so let's just disable processing of this for now.
// We can revist this later if we actually need this functionality, but the parsing logic needs to change.
// We can revisit this later if we actually need this functionality, but the parsing logic needs to change.
// if(signature == null) {
return null;
// }
@@ -166,7 +166,7 @@ private ClassReferenceMirror[] parseParameters(String params) {
for(int i = 0; i < params.length(); i++) {
char c = params.charAt(i);
if(c == 'Z') {
// Booelan
// Boolean
ret.add(new ClassReferenceMirror(StringUtils.stringMultiply(arrayStack, "[") + "Z"));
arrayStack = 0;
} else if(c == 'B') {
@@ -4,7 +4,7 @@

/**
* This class is meant as a near drop in replacement for java.awt.Color, except it doesn't initialize the GUI framework,
* which is undesireable in cmdline applications. An instance of this class can be converted to a java.awt.Color,
* which is undesirable in cmdline applications. An instance of this class can be converted to a java.awt.Color,
* however, if absolutely necessary.
*
* While this is attempting to (mostly) be a drop in replacement, not all features are available, particularly the ones
@@ -186,7 +186,7 @@ && checkSignatureForCompatibility(next.getParameterTypes(), method.getParameterT
}
//Now all the overridden methods have been removed from the list of methods in all the
//classes. We now need to go through and find out which of the remaining methods *could*
//be overriden, as many may not be overrides anyways.
//be overridden, as many may not be overrides anyways.
Set<Method> methodsInError = new HashSet<>();
for(Class c : methods.keySet()) {
Set<Method> mm = methods.get(c);
@@ -804,8 +804,8 @@ public static char[] bytesToChar(byte[] bytes) {
}

/**
* Converts a byte aray to a char array, assuming the given encoding. This is done in a secure manner, and
* potentially sensitive data is cleared from memory after the encoding isdone.
* Converts a byte array to a char array, assuming the given encoding. This is done in a secure manner, and
* potentially sensitive data is cleared from memory after the encoding is done.
*
* @param bytes The byte array to convert
* @param encoding The encoding to use
@@ -14,7 +14,7 @@
* <li>sourcefile:line1-line2: message</li>
* </ul>
*
* Currently, explicitely <strong>not</strong> supported are the following otherwise valid GNU error message formats:
* Currently, explicitly <strong>not</strong> supported are the following otherwise valid GNU error message formats:
* <ul>
* <li>file1:line1.column1-file2:line2.column2: message</li>
* <li>program:sourcefile:lineno: message</li>
@@ -851,7 +851,7 @@ public static String toHex(byte[] bytes) {
}

/**
* Splits a string on word boundries.
* Splits a string on word boundaries.
*
* @param text
* @param len
@@ -17,7 +17,7 @@
import javax.swing.JOptionPane;

/**
* Provides common UI utilites
* Provides common UI utilities
*/
public class UIUtils {

@@ -39,7 +39,7 @@
* }
* </code></pre>
*
* This code can be better written with a Vistor pattern
* This code can be better written with a Visitor pattern
*
* <pre><code>
*
@@ -35,7 +35,7 @@ public class FileLocations {
tmp.delete();
tmp.deleteOnExit();
} catch (SecurityException | IOException e) {
//This could happen in applets or some other wierd security configuration.
//This could happen in applets or some other weird security configuration.
//Regardless, we don't want this to ever fail.
}
USER_HOME = userHome;
@@ -34,7 +34,7 @@ public void setCapability(Capability capability, CapabilityValue value) {
if(value.serverReturnable()) {
caps.put(capability, value);
} else {
throw new RuntimeException("An error occured during runtime, the server returned an invalid capability: " + value);
throw new RuntimeException("An error occurred during runtime, the server returned an invalid capability: " + value);
}
}

@@ -50,7 +50,7 @@ public static <T, U> MapBuilder<T, U> empty(Class<T> keyType, Class<U> valueType
* may also be non-empty if you wish to prepopulate the map through other means.
* @param <T> The key type.
* @param <U> The value type.
* @param existingMap An exisiting Map.
* @param existingMap An existing Map.
* @return A new MapBuilder object wrapping the provided Map instance.
*/
public static <T, U> MapBuilder<T, U> empty(Map<T, U> existingMap) {
@@ -270,7 +270,7 @@ private void dump(final Map<String, SubdomainNode> node, final int offset) {
}

/**
* Immmutable subdomain node.
* Immutable subdomain node.
*/
private static class SubdomainNode {

@@ -58,7 +58,7 @@ public SimpleVersion(int major, int minor, int supplemental, String tag) {
}

/**
* Creates a new version with programmatic parameters, and an emtpy tag.
* Creates a new version with programmatic parameters, and an empty tag.
*
* @param major
* @param minor
@@ -25,7 +25,7 @@ public VirtualFile(String path) {
}
//Now, remove duplicate slashes
working = working.replaceAll("[/]{2,}", "/");
//Remove unneccessary dots
//Remove unnecessary dots
if(working.startsWith("./")) {
working = working.substring(2);
}
@@ -68,7 +68,7 @@ public String toString() {
* forwarding a message.
* </code></pre>
*
* Therefore, this method is a convenience method to implementing the correct symantics described here. If
* Therefore, this method is a convenience method to implementing the correct semantics described here. If
* there are multiple headers with the same name, then they are concatenated together with a comma, and returned
* as if they were a single header.
*
@@ -149,7 +149,7 @@ public RequestSettings setQueryParameters(Map<String, String> parameters) {
/**
* Sets the query parameters. Unlike the normal parameters, these are ALWAYS put in the query, regardless
* of whether or not the method is GET or POST, which can be useful when a protocol requires an empty post body
* as well as query parameters. If you are explicitely setting a post body, you may use either this or
* as well as query parameters. If you are explicitly setting a post body, you may use either this or
* setParameters, as the effect will be the same.
* @param parameters
* @return
@@ -275,7 +275,7 @@ public static RawHTTPResponse getWebStream(URL url, RequestSettings requestSetti
}
//First, let's check to see that the url is properly formatted. If there are parameters,
//and this is a GET request, we want to tack them on to the end. OR, if there is a raw parameter and parameters,
//and this is a post reqest, put the parameters on anyways.
//and this is a post request, put the parameters on anyways.
if(parameters != null && !parameters.isEmpty()
&& (method == HTTPMethod.GET
|| (method != HTTPMethod.GET
@@ -204,8 +204,8 @@ public boolean isZipped() {
}

/**
* Returns a raw input stream for this file. If you just need the string contents, it would probably be easer to use
* getFileContents instead, however, this method is necessary for accessing binary files.
* Returns a raw input stream for this file. If you just need the string contents, it would probably be easier to
* use getFileContents instead, however, this method is necessary for accessing binary files.
*
* @return An InputStream that will read the specified file
* @throws FileNotFoundException If the file is not found
@@ -49,7 +49,7 @@ public static void forceServerType(Implementation.Type type) {
* Sets the server type in normal usage. In normal usage, this can only be called once, and additional calls
* are an error. While {@link #forceServerType(com.laytonsmith.abstraction.Implementation.Type)} does exist, and
* can be used to bypass this, and it may be tempting to check server if {@link #GetServerType} throws an exception
* before setting this, these temptations should be avoided (except where explicitely allowed) as fixing your code
* before setting this, these temptations should be avoided (except where explicitly allowed) as fixing your code
* in any other way will inevitably lead to other problems down the road. This code should only be called once,
* with the correct type, since the code makes assumptions based on the first type sent to it. Additionally, setting
* the type twice with the same type, while it would not directly cause an error, is still a serious code smell, and
@@ -266,7 +266,7 @@ public void broadcastMessage(String message, Set<MCCommandSender> recipients) {
}

/**
* Broadcasts a message to a list of recipients, fireing a {@link BroadcastMessageEvent} before doing so.
* Broadcasts a message to a list of recipients, firing a {@link BroadcastMessageEvent} before doing so.
* {@link ConsoleCommandSender Console} has to be included in this list to receive the broadcast.
* @param message - The message to broadcast.
* @param recipients - A list of {@link MCCommandSender command senders} to send the message to.
@@ -148,7 +148,7 @@ public void onPlayerChat(final AsyncPlayerChatEvent event) {

// SortedSet<BoundEvent> events = EventUtils.GetEvents(Driver.PLAYER_CHAT);
// Event driver = EventList.getEvent(Driver.PLAYER_CHAT, "player_chat");
// //Unfortunately, due to priority issues, if any event is syncronous, all of them
// //Unfortunately, due to priority issues, if any event is synchronous, all of them
// //have to be synchronous.
// boolean canBeAsync = true;
// boolean actuallyNeedToFire = false;