Commit 2a3003cf authored by Eric Bruneton's avatar Eric Bruneton

Update to google-java-format-gradle-plugin v.0.7.1.

parent d209ecc3
......@@ -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);
......
......@@ -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, &lt;clinit&gt;, 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, &lt;init&gt;, 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
......
......@@ -120,7 +120,8 @@ class SerialVersionClass implements Serializable {
protected static final int aField = 32;
static {}
static {
}
public static Object[] aMethod() {
return null;
......
......@@ -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);
......
......@@ -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
......
......@@ -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>
......
......@@ -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);
......
......@@ -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 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment