Skip to content

Commit dd34092

Browse files
committed
#914 Correct with Code Standards
Conform to project coding standards regarding tabs, line feeds and encoding.
1 parent 046d98c commit dd34092

File tree

2 files changed

+46
-16
lines changed

2 files changed

+46
-16
lines changed

.gitattributes

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.java text
7+
*.js text
8+
9+
# Declare files that will always have CRLF line endings on checkout.
10+
*.sln text eol=crlf
11+
12+
# Denote all files that are truly binary and should not be modified.
13+
*.png binary
14+
*.jpg binary
15+
16+
# Custom for Visual Studio
17+
*.cs diff=csharp
18+
19+
# Standard to msysgit
20+
*.doc diff=astextplain
21+
*.DOC diff=astextplain
22+
*.docx diff=astextplain
23+
*.DOCX diff=astextplain
24+
*.dot diff=astextplain
25+
*.DOT diff=astextplain
26+
*.pdf diff=astextplain
27+
*.PDF diff=astextplain
28+
*.rtf diff=astextplain
29+
*.RTF diff=astextplain

java8/src/main/java/cucumber/runtime/java8/ConstantPoolTypeIntrospector.java

+17-16
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public Type[] getGenericTypes(Class<?> clazz) throws Exception {
2525
Type[] typeArguments;
2626
ConstantPool constantPool = (ConstantPool) Class_getConstantPool.invoke(clazz);
2727
String typeString = getTypeString(constantPool);
28-
jdk.internal.org.objectweb.asm.Type[] argumentTypes = jdk.internal.org.objectweb.asm.Type.getArgumentTypes(typeString);
28+
jdk.internal.org.objectweb.asm.Type[] argumentTypes = jdk.internal.org.objectweb.asm.Type
29+
.getArgumentTypes(typeString);
2930
typeArguments = new Type[argumentTypes.length];
3031
for (int i = 0; i < argumentTypes.length; i++) {
3132
typeArguments[i] = Class.forName(argumentTypes[i].getClassName());
@@ -34,21 +35,21 @@ public Type[] getGenericTypes(Class<?> clazz) throws Exception {
3435
}
3536

3637
private String getTypeString(ConstantPool constantPool) {
37-
int size = constantPool.getSize();
38-
String[] memberRef = null;
39-
40-
// find last element in constantpool with valid memberRef
41-
// - previously always at size-2 index but changed with 1.8.0_60
42-
for (int i=size-1; i>-1; i--) {
43-
try {
44-
memberRef = constantPool.getMemberRefInfoAt(i);
45-
break;
46-
} catch (IllegalArgumentException e) {
47-
// eat error; null entry at ConstantPool index?
48-
}
49-
}
50-
51-
return memberRef[2];
38+
int size = constantPool.getSize();
39+
String[] memberRef = null;
40+
41+
// find last element in constantpool with valid memberRef
42+
// - previously always at size-2 index but changed with JDK 1.8.0_60
43+
for (int i = size - 1; i > -1; i--) {
44+
try {
45+
memberRef = constantPool.getMemberRefInfoAt(i);
46+
break;
47+
} catch (IllegalArgumentException e) {
48+
// eat error; null entry at ConstantPool index?
49+
}
50+
}
51+
52+
return memberRef[2];
5253
}
5354

5455
}

0 commit comments

Comments
 (0)