99% возвращается одна компания, но банк даёт возможность создавать клонов, т.е. это одна и та же компания, но все равно будет возвращаться массив из одного элемента, если ты знаком с elasticsearch
другими словами: все строковые литералы интернированы?
JLS 3.10.5 String Literals: "Moreover, a string literal always refers to the same instance of class String. This is because string literals - or, more generally, strings that are the values of constant expressions (§15.28) - are "interned" so as to share unique instances, using the method String.intern"
JLS 3.10.5 String Literals: "Moreover, a string literal always refers to the same instance of class String. This is because string literals - or, more generally, strings that are the values of constant expressions (§15.28) - are "interned" so as to share unique instances, using the method String.intern"
Там были ограничения на размер строки или я путаю?