Polishing
This commit is contained in:
parent
6357c5167a
commit
cbd19153c4
|
@ -216,7 +216,7 @@ public class Spr15275Tests {
|
||||||
public Class<?> getObjectType() {
|
public Class<?> getObjectType() {
|
||||||
return FooInterface.class;
|
return FooInterface.class;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
protected interface FooInterface {
|
protected interface FooInterface {
|
||||||
|
|
|
@ -518,22 +518,20 @@ public abstract class StringUtils {
|
||||||
if (!hasLength(str)) {
|
if (!hasLength(str)) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
else {
|
char baseChar = str.charAt(0);
|
||||||
char baseChar = str.charAt(0);
|
char updatedChar;
|
||||||
char updatedChar;
|
if (capitalize) {
|
||||||
if (capitalize) {
|
updatedChar = Character.toUpperCase(baseChar);
|
||||||
updatedChar = Character.toUpperCase(baseChar);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
updatedChar = Character.toLowerCase(baseChar);
|
|
||||||
}
|
|
||||||
if (baseChar == updatedChar) {
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
char[] chars = str.toCharArray();
|
|
||||||
chars[0] = updatedChar;
|
|
||||||
return new String(chars, 0, chars.length);
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
updatedChar = Character.toLowerCase(baseChar);
|
||||||
|
}
|
||||||
|
if (baseChar == updatedChar) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
char[] chars = str.toCharArray();
|
||||||
|
chars[0] = updatedChar;
|
||||||
|
return new String(chars, 0, chars.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-20167the original author or authors.
|
* Copyright 2002-2017 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1985,7 +1985,6 @@ public class AnnotationUtilsTests {
|
||||||
static class GroupOfCharsClass {
|
static class GroupOfCharsClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@interface AliasForWithMissingAttributeDeclaration {
|
@interface AliasForWithMissingAttributeDeclaration {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue