Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jamie Mansfield
asm
Commits
2a3003cf
Commit
2a3003cf
authored
Jun 15, 2018
by
Eric Bruneton
Browse files
Update to google-java-format-gradle-plugin v.0.7.1.
parent
d209ecc3
Changes
8
Hide whitespace changes
Inline
Side-by-side
asm-commons/src/main/java/org/objectweb/asm/commons/JSRInlinerAdapter.java
View file @
2a3003cf
...
...
@@ -372,8 +372,8 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
LabelNode
clonedJsrLabelNode
=
newInstantiation
.
getClonedLabelForJumpInsn
(
jsrLabelNode
);
// Replace the JSR instruction with a GOTO to the instantiated subroutine, and push NULL
// for what was once the return address value. This hack allows us to avoid doing any sort
// of data flow analysis to figure out which instructions manipulate the old return
address
// value pointer which is now known to be unneeded.
// of data flow analysis to figure out which instructions manipulate the old return
//
address
value pointer which is now known to be unneeded.
newInstructions
.
add
(
new
InsnNode
(
ACONST_NULL
));
newInstructions
.
add
(
new
JumpInsnNode
(
GOTO
,
clonedJsrLabelNode
));
newInstructions
.
add
(
newInstantiation
.
returnLabel
);
...
...
asm-commons/src/main/java/org/objectweb/asm/commons/SerialVersionUIDAdder.java
View file @
2a3003cf
...
...
@@ -76,28 +76,24 @@ import org.objectweb.asm.Opcodes;
* <li>The modifiers of the field written as a 32-bit integer.
* <li>The descriptor of the field in UTF encoding
* </ol>
*
* <li>If a class initializer exists, write out the following:
* <ol>
* <li>The name of the method, <clinit>, in UTF encoding.
* <li>The modifier of the method, STATIC, written as a 32-bit integer.
* <li>The descriptor of the method, ()V, in UTF encoding.
* </ol>
*
* <li>For each non-private constructor sorted by method name and signature:
* <ol>
* <li>The name of the method, <init>, in UTF encoding.
* <li>The modifiers of the method written as a 32-bit integer.
* <li>The descriptor of the method in UTF encoding.
* </ol>
*
* <li>For each non-private method sorted by method name and signature:
* <ol>
* <li>The name of the method in UTF encoding.
* <li>The modifiers of the method written as a 32-bit integer.
* <li>The descriptor of the method in UTF encoding.
* </ol>
*
* <li>The SHA-1 algorithm is executed on the stream of bytes produced by DataOutputStream and
* produces five 32-bit values sha[0..4].
* <li>The hash value is assembled from the first and second 32-bit values of the SHA-1 message
...
...
asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUIDAdderTest.java
View file @
2a3003cf
...
...
@@ -120,7 +120,8 @@ class SerialVersionClass implements Serializable {
protected
static
final
int
aField
=
32
;
static
{}
static
{
}
public
static
Object
[]
aMethod
()
{
return
null
;
...
...
asm/src/main/java/org/objectweb/asm/ClassReader.java
View file @
2a3003cf
...
...
@@ -3249,8 +3249,8 @@ public class ClassReader {
final
Label
[]
labels
)
{
for
(
int
i
=
0
;
i
<
attributePrototypes
.
length
;
++
i
)
{
if
(
attributePrototypes
[
i
].
type
.
equals
(
type
))
{
return
attributePrototypes
[
i
]
.
read
(
this
,
offset
,
length
,
charBuffer
,
codeAttributeOffset
,
labels
);
return
attributePrototypes
[
i
]
.
read
(
this
,
offset
,
length
,
charBuffer
,
codeAttributeOffset
,
labels
);
}
}
return
new
Attribute
(
type
).
read
(
this
,
offset
,
length
,
null
,
-
1
,
null
);
...
...
asm/src/main/java/org/objectweb/asm/Frame.java
View file @
2a3003cf
...
...
@@ -84,7 +84,6 @@ package org.objectweb.asm;
* <li>a position relatively to the top of the stack of the input stack frame, if KIND is
* equal to {@link #STACK_KIND},
* </ul>
*
* </ul>
*
* <p>Output frames can contain abstract types of any kind and with a positive or negative array
...
...
asm/src/main/java/org/objectweb/asm/MethodVisitor.java
View file @
2a3003cf
...
...
@@ -259,7 +259,6 @@ public abstract class MethodVisitor {
* the empty stack (<code>nLocals</code> is 1, 2 or 3).
* <li>{@link Opcodes#F_FULL} representing complete frame data.
* </ul>
*
* </ul>
*
* <br>
...
...
asm/src/test/java/org/objectweb/asm/TypeTest.java
View file @
2a3003cf
...
...
@@ -81,31 +81,30 @@ public class TypeTest implements Opcodes {
@ParameterizedTest
@ValueSource
(
strings
=
{
"I"
,
"V"
,
"Z"
,
"B"
,
"C"
,
"S"
,
"D"
,
"F"
,
"J"
,
"LI;"
,
"LV;"
,
"Ljava/lang/Object;"
,
"[I"
,
"[LI;"
,
"[[Ljava/lang/Object;"
,
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
}
)
strings
=
{
"I"
,
"V"
,
"Z"
,
"B"
,
"C"
,
"S"
,
"D"
,
"F"
,
"J"
,
"LI;"
,
"LV;"
,
"Ljava/lang/Object;"
,
"[I"
,
"[LI;"
,
"[[Ljava/lang/Object;"
,
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
})
public
void
testGetTypeFromDescriptor
(
final
String
descriptor
)
{
Type
type
=
Type
.
getType
(
descriptor
);
assertEquals
(
descriptor
,
type
.
getDescriptor
());
...
...
@@ -127,16 +126,15 @@ public class TypeTest implements Opcodes {
@ParameterizedTest
@ValueSource
(
strings
=
{
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
}
)
strings
=
{
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
})
public
void
testGetMethodTypeFromDescriptor
(
final
String
methodDescriptor
)
{
Type
type
=
Type
.
getMethodType
(
methodDescriptor
);
assertEquals
(
Type
.
METHOD
,
type
.
getSort
());
...
...
@@ -146,16 +144,15 @@ public class TypeTest implements Opcodes {
@ParameterizedTest
@ValueSource
(
strings
=
{
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
}
)
strings
=
{
"(IZBCSDFJLI;LV;Ljava/lang/Object;[I[LI;[[Ljava/lang/Object;)V"
,
"()I"
,
"()LI;"
,
"()Ljava/lang/Object;"
,
"()[I"
,
"()[LI;"
,
"()[[Ljava/lang/Object;"
})
public
void
testGetMethodGetArgumentsAndGetReturnType
(
final
String
methodDescriptor
)
{
Type
[]
argumentTypes
=
Type
.
getArgumentTypes
(
methodDescriptor
);
Type
returnType
=
Type
.
getReturnType
(
methodDescriptor
);
...
...
build.gradle
View file @
2a3003cf
...
...
@@ -27,16 +27,11 @@
// THE POSSIBILITY OF SUCH DAMAGE.
buildscript
{
repositories
{
mavenCentral
()
maven
{
url
'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies
{
classpath
'com.github.sherter.googlejavaformatgradleplugin:google-java-format-gradle-plugin:0.7-SNAPSHOT'
}
repositories
{
mavenCentral
()
}
}
plugins
{
id
'biz.aQute.bnd.builder'
version
'3.3.0'
apply
false
}
plugins
{
id
'com.github.sherter.google-java-format'
version
'0.7.1'
apply
false
}
plugins
{
id
'me.champeau.gradle.jmh'
version
'0.4.5'
apply
false
}
plugins
{
id
'org.sonarqube'
version
'2.6.2'
apply
false
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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