mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - SplitName - extract constant
This commit is contained in:
@@ -110,7 +110,7 @@ public class ElPropertyChain implements ElPropertyValue {
|
||||
return containsMany;
|
||||
}
|
||||
|
||||
int i = 1 + SplitName.count('.', sinceProperty);
|
||||
int i = 1 + SplitName.count(sinceProperty);
|
||||
|
||||
for (; i < chain.length; i++) {
|
||||
if (chain[i].getBeanProperty().containsMany()) {
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.avaje.ebeaninternal.server.query;
|
||||
|
||||
public class SplitName {
|
||||
|
||||
private static final char PERIOD = '.';
|
||||
|
||||
public static String add(String prefix, String name) {
|
||||
if (prefix != null) {
|
||||
return prefix + "." + name;
|
||||
@@ -13,11 +15,11 @@ public class SplitName {
|
||||
/**
|
||||
* Return the number of occurrences of char in name.
|
||||
*/
|
||||
public static int count(char c, String name) {
|
||||
public static int count(String name) {
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < name.length(); i++) {
|
||||
if (c == name.charAt(i)) {
|
||||
if (PERIOD == name.charAt(i)) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user