Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Fastjson
Commits
5fb05f03
Commit
5fb05f03
authored
10 years ago
by
wenshao
Browse files
Options
Download
Email Patches
Plain Diff
fixed javadoc error
parent
76eb35ca
Changes
87
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
src/main/java/com/alibaba/fastjson/JSON.java
+1
-1
src/main/java/com/alibaba/fastjson/JSON.java
src/main/java/com/alibaba/fastjson/JSONArray.java
+1
-1
src/main/java/com/alibaba/fastjson/JSONArray.java
src/main/java/com/alibaba/fastjson/JSONAware.java
+1
-1
src/main/java/com/alibaba/fastjson/JSONAware.java
src/main/java/com/alibaba/fastjson/JSONException.java
+1
-1
src/main/java/com/alibaba/fastjson/JSONException.java
src/main/java/com/alibaba/fastjson/JSONObject.java
+1
-1
src/main/java/com/alibaba/fastjson/JSONObject.java
src/main/java/com/alibaba/fastjson/JSONStreamAware.java
+1
-1
src/main/java/com/alibaba/fastjson/JSONStreamAware.java
src/main/java/com/alibaba/fastjson/annotation/JSONField.java
+3
-2
src/main/java/com/alibaba/fastjson/annotation/JSONField.java
src/main/java/com/alibaba/fastjson/annotation/JSONType.java
+1
-1
src/main/java/com/alibaba/fastjson/annotation/JSONType.java
src/main/java/com/alibaba/fastjson/asm/ClassWriter.java
+2
-5
src/main/java/com/alibaba/fastjson/asm/ClassWriter.java
src/main/java/com/alibaba/fastjson/asm/Label.java
+4
-4
src/main/java/com/alibaba/fastjson/asm/Label.java
src/main/java/com/alibaba/fastjson/asm/MethodVisitor.java
+0
-9
src/main/java/com/alibaba/fastjson/asm/MethodVisitor.java
src/main/java/com/alibaba/fastjson/asm/Type.java
+11
-19
src/main/java/com/alibaba/fastjson/asm/Type.java
src/main/java/com/alibaba/fastjson/parser/CharTypes.java
+1
-1
src/main/java/com/alibaba/fastjson/parser/CharTypes.java
src/main/java/com/alibaba/fastjson/parser/DefaultExtJSONParser.java
+1
-1
...ava/com/alibaba/fastjson/parser/DefaultExtJSONParser.java
src/main/java/com/alibaba/fastjson/parser/DefaultJSONParser.java
+1
-1
...n/java/com/alibaba/fastjson/parser/DefaultJSONParser.java
src/main/java/com/alibaba/fastjson/parser/Feature.java
+1
-1
src/main/java/com/alibaba/fastjson/parser/Feature.java
src/main/java/com/alibaba/fastjson/parser/JSONLexerBase.java
+1
-1
src/main/java/com/alibaba/fastjson/parser/JSONLexerBase.java
src/main/java/com/alibaba/fastjson/parser/JSONReaderScanner.java
+1
-1
...n/java/com/alibaba/fastjson/parser/JSONReaderScanner.java
src/main/java/com/alibaba/fastjson/parser/JSONScanner.java
+1
-1
src/main/java/com/alibaba/fastjson/parser/JSONScanner.java
src/main/java/com/alibaba/fastjson/parser/JSONToken.java
+1
-1
src/main/java/com/alibaba/fastjson/parser/JSONToken.java
with
35 additions
and
54 deletions
+35
-54
src/main/java/com/alibaba/fastjson/JSON.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -53,7 +53,7 @@ import com.alibaba.fastjson.util.ThreadLocalCache;
import
com.alibaba.fastjson.util.TypeUtils
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
abstract
class
JSON
implements
JSONStreamAware
,
JSONAware
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/JSONArray.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -43,7 +43,7 @@ import java.util.RandomAccess;
import
com.alibaba.fastjson.util.TypeUtils
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
class
JSONArray
extends
JSON
implements
List
<
Object
>,
Cloneable
,
RandomAccess
,
Serializable
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/JSONAware.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -18,7 +18,7 @@ package com.alibaba.fastjson;
/**
* Beans that support customized output of JSON text shall implement this interface.
*
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
interface
JSONAware
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/JSONException.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -16,7 +16,7 @@
package
com.alibaba.fastjson
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
class
JSONException
extends
RuntimeException
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/JSONObject.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -46,7 +46,7 @@ import com.alibaba.fastjson.parser.ParserConfig;
import
com.alibaba.fastjson.util.TypeUtils
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
class
JSONObject
extends
JSON
implements
Map
<
String
,
Object
>,
Cloneable
,
Serializable
,
InvocationHandler
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/JSONStreamAware.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -20,7 +20,7 @@ import java.io.IOException;
/**
* Beans that support customized output of JSON text to a writer shall implement this interface.
*
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
interface
JSONStreamAware
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/annotation/JSONField.java
+
3
-
2
View file @
5fb05f03
...
...
@@ -24,14 +24,15 @@ import com.alibaba.fastjson.parser.Feature;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
METHOD
,
ElementType
.
FIELD
,
ElementType
.
PARAMETER
})
public
@interface
JSONField
{
/**
* config encode
&
decode ordinal
* config encode
/
decode ordinal
* @since 1.1.42
* @return
*/
int
ordinal
()
default
0
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/annotation/JSONType.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -8,7 +8,7 @@ import java.lang.annotation.Target;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
TYPE
})
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/asm/ClassWriter.java
+
2
-
5
View file @
5fb05f03
...
...
@@ -30,9 +30,6 @@
package
com.alibaba.fastjson.asm
;
/**
* A {@link ClassVisitor} that generates classes in bytecode form. More precisely this visitor generates a byte array
* conforming to the Java class file format. It can be used alone, to generate a Java class "from scratch", or with one
* or more and adapter class visitor to generate a modified class from one or more existing Java classes.
*
* @author Eric Bruneton
*/
...
...
@@ -50,8 +47,8 @@ public class ClassWriter {
/**
* Flag to automatically compute the stack map frames of methods from scratch. If this flag is set, then the calls
* to the
{@link
MethodVisitor#visitFrame
}
method are ignored, and the stack map frames are recomputed from the
* methods bytecode. The arguments of the
{@link
MethodVisitor#visitMaxs
visitMaxs}
method are also ignored and
* to the MethodVisitor#visitFrame method are ignored, and the stack map frames are recomputed from the
* methods bytecode. The arguments of the MethodVisitor#visitMaxs method are also ignored and
* recomputed from the bytecode. In other words, computeFrames implies computeMaxs.
*
* @see #ClassWriter(int)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/asm/Label.java
+
4
-
4
View file @
5fb05f03
...
...
@@ -47,7 +47,7 @@ public class Label {
/**
* Field used to associate user information to a label. Warning: this field is used by the ASM tree package. In
* order to use it with the ASM tree package you must override the
*
{@link
com.alibaba.fastjson.asm.tree.MethodNode#getLabelNode
}
method.
*com.alibaba.fastjson.asm.tree.MethodNode#getLabelNode method.
*/
public
Object
info
;
...
...
@@ -74,7 +74,7 @@ public class Label {
* reference, while the second is the position of the first byte of the forward reference itself. In fact the sign
* of the first integer indicates if this reference uses 2 or 4 bytes, and its absolute value gives the position of
* the bytecode instruction. This array is also used as a bitset to store the subroutines to which a basic block
* belongs. This information is needed in
{@linked
MethodWriter#visitMaxs
}
, after all forward references have been
* belongs. This information is needed in MethodWriter#visitMaxs, after all forward references have been
* resolved. Hence the same array can be used for both purposes without problems.
*/
private
int
[]
srcAndRefPositions
;
...
...
@@ -90,7 +90,7 @@ public class Label {
* stack map frames are similar and use two steps. The first step, during the visit of each instruction, builds
* information about the state of the local variables and the operand stack at the end of each basic block, called
* the "output frame", <i>relatively</i> to the frame state at the beginning of the basic block, which is called the
* "input frame", and which is <i>unknown</i> during this step. The second step, in
{@
link MethodWriter#visitMaxs
}
,
* "input frame", and which is <i>unknown</i> during this step. The second step, in link MethodWriter#visitMaxs,
* is a fix point algorithm that computes information about the input frame of each basic block, from the input
* state of the first basic block (known from the method signature), and by the using the previously computed
* relative output frames. The algorithm used to compute the maximum stack size only computes the relative output
...
...
@@ -117,7 +117,7 @@ public class Label {
/**
* The successor of this label, in the order they are visited. This linked list does not include labels used for
* debug info only. If
{@link
ClassWriter#COMPUTE_FRAMES
}
option is used then, in addition, it does not contain
* debug info only. If ClassWriter#COMPUTE_FRAMES option is used then, in addition, it does not contain
* successive labels that denote the same bytecode position (in this case only the first label appears in this
* list).
*/
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/asm/MethodVisitor.java
+
0
-
9
View file @
5fb05f03
...
...
@@ -30,15 +30,6 @@
package
com.alibaba.fastjson.asm
;
/**
* A visitor to visit a Java method. The methods of this interface must be called in the following order: [
* <tt>visitAnnotationDefault</tt> ] ( <tt>visitAnnotation</tt> | <tt>visitParameterAnnotation</tt> |
* <tt>visitAttribute</tt> )* [ <tt>visitCode</tt> ( <tt>visitFrame</tt> | <tt>visit</tt><i>X</i>Insn</tt> |
* <tt>visitLabel</tt> | <tt>visitTryCatchBlock</tt> | <tt>visitLocalVariable</tt> | <tt>visitLineNumber</tt>)*
* <tt>visitMaxs</tt> ] <tt>visitEnd</tt>. In addition, the <tt>visit</tt><i>X</i>Insn</tt> and <tt>visitLabel</tt>
* methods must be called in the sequential order of the bytecode instructions of the visited code,
* <tt>visitTryCatchBlock</tt> must be called <i>before</i> the labels passed as arguments have been visited, and the
* <tt>visitLocalVariable</tt> and <tt>visitLineNumber</tt> methods must be called <i>after</i> the labels passed as
* arguments have been visited.
*
* @author Eric Bruneton
*/
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/asm/Type.java
+
11
-
19
View file @
5fb05f03
...
...
@@ -38,57 +38,57 @@ package com.alibaba.fastjson.asm;
public
class
Type
{
/**
* The sort of the <tt>void</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>void</tt> type.
*/
public
static
final
int
VOID
=
0
;
/**
* The sort of the <tt>boolean</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>boolean</tt> type.
*/
public
static
final
int
BOOLEAN
=
1
;
/**
* The sort of the <tt>char</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>char</tt> type.
*/
public
static
final
int
CHAR
=
2
;
/**
* The sort of the <tt>byte</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>byte</tt> type.
*/
public
static
final
int
BYTE
=
3
;
/**
* The sort of the <tt>short</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>short</tt> type.
*/
public
static
final
int
SHORT
=
4
;
/**
* The sort of the <tt>int</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>int</tt> type.
*/
public
static
final
int
INT
=
5
;
/**
* The sort of the <tt>float</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>float</tt> type.
*/
public
static
final
int
FLOAT
=
6
;
/**
* The sort of the <tt>long</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>long</tt> type.
*/
public
static
final
int
LONG
=
7
;
/**
* The sort of the <tt>double</tt> type.
See {@link #getSort getSort}.
* The sort of the <tt>double</tt> type.
*/
public
static
final
int
DOUBLE
=
8
;
/**
* The sort of array reference types.
See {@link #getSort getSort}.
* The sort of array reference types.
*/
public
static
final
int
ARRAY
=
9
;
/**
* The sort of object reference type.
See {@link #getSort getSort}.
* The sort of object reference type.
*/
public
static
final
int
OBJECT
=
10
;
...
...
@@ -192,14 +192,6 @@ public class Type {
return
getType
(
typeDescriptor
.
toCharArray
(),
0
);
}
/**
* Computes the size of the arguments and of the return value of a method.
*
* @param desc the descriptor of a method.
* @return the size of the arguments of the method (plus one for the implicit this argument), argSize, and the size
* of its return value, retSize, packed into a single int i = <tt>(argSize << 2) | retSize</tt> (argSize is
* therefore equal to <tt>i >> 2</tt>, and retSize to <tt>i & 0x03</tt>).
*/
public
static
int
getArgumentsAndReturnSizes
(
final
String
desc
)
{
int
n
=
1
;
int
c
=
1
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/CharTypes.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -16,7 +16,7 @@
package
com.alibaba.fastjson.parser
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
final
class
CharTypes
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/DefaultExtJSONParser.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -17,7 +17,7 @@ package com.alibaba.fastjson.parser;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
@Deprecated
public
class
DefaultExtJSONParser
extends
DefaultJSONParser
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/DefaultJSONParser.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -70,7 +70,7 @@ import com.alibaba.fastjson.serializer.StringCodec;
import
com.alibaba.fastjson.util.TypeUtils
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
class
DefaultJSONParser
extends
AbstractJSONParser
implements
Closeable
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/Feature.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -16,7 +16,7 @@
package
com.alibaba.fastjson.parser
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
enum
Feature
{
/**
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/JSONLexerBase.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -40,7 +40,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONException
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
abstract
class
JSONLexerBase
implements
JSONLexer
,
Closeable
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/JSONReaderScanner.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -30,7 +30,7 @@ import com.alibaba.fastjson.util.IOUtils;
//这个类,为了性能优化做了很多特别处理,一切都是为了性能!!!
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
final
class
JSONReaderScanner
extends
JSONLexerBase
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/JSONScanner.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -29,7 +29,7 @@ import com.alibaba.fastjson.util.Base64;
//这个类,为了性能优化做了很多特别处理,一切都是为了性能!!!
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
final
class
JSONScanner
extends
JSONLexerBase
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/alibaba/fastjson/parser/JSONToken.java
+
1
-
1
View file @
5fb05f03
...
...
@@ -16,7 +16,7 @@
package
com.alibaba.fastjson.parser
;
/**
* @author wenshao
<
szujobs@hotmail.com
>
* @author wenshao
[
szujobs@hotmail.com
]
*/
public
class
JSONToken
{
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment