Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos #50

Merged
merged 1 commit into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions accessors-smart/src/main/java/net/minidev/asm/ASMUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public class ASMUtil {
/**
* Append the call of proper autoboxing method for the given primitif type.
* Append the call of proper autoboxing method for the given primitive type.
*/
public static void autoBoxing(MethodVisitor mv, Class<?> clz) {
autoBoxing(mv, Type.getType(clz));
Expand Down Expand Up @@ -68,7 +68,7 @@ static public Accessor[] getAccessors(Class<?> type, FieldFilter filter) {
}

/**
* Append the call of proper autoboxing method for the given primitif type.
* Append the call of proper autoboxing method for the given primitive type.
*/
protected static void autoBoxing(MethodVisitor mv, Type fieldType) {
switch (fieldType.getSort()) {
Expand Down Expand Up @@ -146,7 +146,7 @@ protected static void autoUnBoxing1(MethodVisitor mv, Type fieldType) {

/**
* Append the call of proper extract primitive type of an boxed object. this
* methode use Number interface to unbox object
* method use Number interface to unbox object
*/
protected static void autoUnBoxing2(MethodVisitor mv, Type fieldType) {
switch (fieldType.getSort()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* field, getter setter
*
* this object is used internally by BeansAcces
* this object is used internally by BeansAccess
*
* @see BeansAccess
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static public <P> BeansAccess<P> get(Class<P> type, FieldFilter filter) {
if (access != null)
return access;
}
// extract all access methodes
// extract all access methods
Accessor[] accs = ASMUtil.getAccessors(type, filter);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class BeansAccessBuilder {
final String accessClassNameInternal;
final String classNameInternal;
final HashMap<Class<?>, Method> convMtds = new HashMap<Class<?>, Method>();
// Class<? extends Exception> exeptionClass = net.minidev.asm.ex.NoSuchFieldException.class;
Class<? extends Exception> exeptionClass = NoSuchFieldException.class;
// Class<? extends Exception> exceptionClass = net.minidev.asm.ex.NoSuchFieldException.class;
Class<? extends Exception> exceptionClass = NoSuchFieldException.class;

/**
* Build reflect bytecode from accessor list.
Expand Down Expand Up @@ -158,8 +158,8 @@ public Class<?> bulid() {
i++;
}
}
if (exeptionClass != null)
throwExIntParam(mv, exeptionClass);
if (exceptionClass != null)
throwExIntParam(mv, exceptionClass);
else
mv.visitInsn(RETURN);
mv.visitMaxs(0, 0);
Expand Down Expand Up @@ -224,8 +224,8 @@ public Class<?> bulid() {
}
}

if (exeptionClass != null)
throwExIntParam(mv, exeptionClass);
if (exceptionClass != null)
throwExIntParam(mv, exceptionClass);
else {
mv.visitInsn(ACONST_NULL);
mv.visitInsn(ARETURN);
Expand All @@ -251,8 +251,8 @@ public Class<?> bulid() {
mv.visitFrame(F_SAME, 0, null, 0, null);
i++;
}
if (exeptionClass != null)
throwExStrParam(mv, exeptionClass);
if (exceptionClass != null)
throwExStrParam(mv, exceptionClass);
else
mv.visitInsn(RETURN);
mv.visitMaxs(0, 0); // 2,4
Expand Down Expand Up @@ -287,8 +287,8 @@ public Class<?> bulid() {
mv.visitFrame(F_SAME, 0, null, 0, null);
i++;
}
if (exeptionClass != null)
throwExStrParam(mv, exeptionClass);
if (exceptionClass != null)
throwExStrParam(mv, exceptionClass);
else {
mv.visitInsn(ACONST_NULL);
mv.visitInsn(ARETURN);
Expand Down Expand Up @@ -347,15 +347,15 @@ private void internalSetFiled(MethodVisitor mv, Accessor acc) {
*/
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, classNameInternal);
// get VELUE
// get VALUE
mv.visitVarInsn(ALOAD, 3);
Type fieldType = Type.getType(acc.getType());
Class<?> type = acc.getType();
String destClsName = Type.getInternalName(type);

Method conMtd = convMtds.get(type);
if (conMtd != null) {
// external converion
// external conversion
String clsSig = Type.getInternalName(conMtd.getDeclaringClass());
String mtdName = conMtd.getName();
String mtdSig = Type.getMethodDescriptor(conMtd);
Expand Down Expand Up @@ -436,7 +436,7 @@ private void throwExStrParam(MethodVisitor mv, Class<?> exCls) {
private void ifNotEqJmp(MethodVisitor mv, int param, int value, Label label) {
mv.visitVarInsn(ILOAD, param);
if (value == 0) {
/* notest forvalue 0 */
/* notest for value 0 */
mv.visitJumpInsn(IFNE, label);
} else if (value == 1) {
mv.visitInsn(ICONST_1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.lang.reflect.Method;

/**
* Simple extension from ClassLoader overiding the loadClass(String name,
* Simple extension from ClassLoader overriding the loadClass(String name,
* boolean resolve) method and allowing to register new classes
*
* @author uriel
Expand Down
6 changes: 3 additions & 3 deletions json-smart/src/main/java/net/minidev/json/JSONArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void merge(Object o2) {
}

/**
* Explicitely Serialize Object as JSon String
* Explicitly Serialize Object as JSon String
*/
public String toJSONString() {
return toJSONString(this, JSONValue.COMPRESSION);
Expand All @@ -107,14 +107,14 @@ public String toJSONString(JSONStyle compression) {
}

/**
* Override natif toStirng()
* Override native toString()
*/
public String toString() {
return toJSONString();
}

/**
* JSONAwareEx inferface
* JSONAwareEx interface
*
* @param compression
* compression param
Expand Down
4 changes: 2 additions & 2 deletions json-smart/src/main/java/net/minidev/json/JSONNavi.java
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public JSONNavi<T> object() {
return this;
if (isArray())
failure("can not use Object feature on Array.", null);
failure("Can not use current possition as Object", null);
failure("Can not use current position as Object", null);
} else {
current = mapper.createObject();
}
Expand All @@ -477,7 +477,7 @@ public JSONNavi<T> array() {
return this;
if (isObject())
failure("can not use Object feature on Array.", null);
failure("Can not use current possition as Object", null);
failure("Can not use current position as Object", null);
} else {
current = mapper.createArray();
}
Expand Down
2 changes: 1 addition & 1 deletion json-smart/src/main/java/net/minidev/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected static JSONObject merge(JSONObject o1, Object o2) {
return o1;
if (o2 instanceof JSONObject)
return merge(o1, (JSONObject) o2);
throw new RuntimeException("JSON megre can not merge JSONObject with " + o2.getClass());
throw new RuntimeException("JSON merge can not merge JSONObject with " + o2.getClass());
}

private static JSONObject merge(JSONObject o1, JSONObject o2) {
Expand Down
2 changes: 1 addition & 1 deletion json-smart/src/main/java/net/minidev/json/JSONStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void objectStop(Appendable out) throws IOException {
}

/**
* Start the first Obeject element
* Start the first Object element
*/
public void objectFirstStart(Appendable out) throws IOException {
}
Expand Down
4 changes: 2 additions & 2 deletions json-smart/src/main/java/net/minidev/json/JSONValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@

/**
* JSONValue is the helper class In most of case you should use those static
* methode to user JSON-smart
* method to user JSON-smart
*
*
* The most commonly use methode are {@link #parse(String)}
* The most commonly use method are {@link #parse(String)}
* {@link #toJSONString(Object)}
*
* @author Uriel Chemouni &lt;uchemouni@gmail.com&gt;
Expand Down
4 changes: 2 additions & 2 deletions json-smart/src/main/java/net/minidev/json/JStylerObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public static boolean isSpecial(char c) {
}

public static boolean isUnicode(char c) {
// ANSI controle char
// ANSI control char
return ((c >= '\u0000' && c <= '\u001F') ||
// DEL or unicode ctrl
(c >= '\u007F' && c <= '\u009F') ||
Expand Down Expand Up @@ -261,7 +261,7 @@ public void escape(String s, Appendable out) {
}
}
} catch (IOException e) {
throw new RuntimeException("Impossible Exeption");
throw new RuntimeException("Impossible Exception");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class JSONParser {
/**
* strict RFC4627 mode.
*
* slower than PERMISIF MODE.
* slower than PERMISSIVE MODE.
*
* @since 1.0.6
*/
Expand Down Expand Up @@ -139,7 +139,7 @@ private JSONParserReader getPStream() {
}

/**
* cached construcor
* cached constructor
*
* @return instance of JSONParserInputStream
*/
Expand All @@ -150,7 +150,7 @@ private JSONParserInputStream getPBinStream() {
}

/**
* cached construcor
* cached constructor
*
* @return instance of JSONParserString
*/
Expand All @@ -161,7 +161,7 @@ private JSONParserString getPString() {
}

/**
* cached construcor
* cached constructor
*
* @return instance of JSONParserByteArray
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public WriterByInterface(Class<?> _interface, JsonWriterI<?> _writer) {
}

/**
* try to find a Writer by Cheking implemented interface
* try to find a Writer by Checking implemented interface
* @param clazz class to serialize
* @return a Writer or null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void startKey(String key) throws IOException {
@Override
public void setValue(Object current, String key, Object value) throws IOException {
// System.out.println("setValue(" + key + "," + value + ")");
// if comprossor => data allready writed
// if compressor => data already be written
if (isCompressor(value)) {
addComma();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Object createArray() {
}

/**
* Allow a mapper to converte a temprary structure to the final data format.
* Allow a mapper to convert a temporary structure to the final data format.
*
* example: convert an List&lt;Integer&gt; to an int[]
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minidev.json.parser.ParseException;

/**
* Simple solution to supporr on read filed renaming
* Simple solution to support on read field renaming
*
* @author uriel
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Object createArray() {
}

/**
* Allow a mapper to converte a temprary structure to the final data format.
* Allow a mapper to convert a temporary structure to the final data format.
*
* example: convert an List&lt;Integer&gt; to an int[]
*/
Expand Down