dCache projects uses four (4) spaces indention. Some historic code still have mixed style. However, the newly written code must stick to spaces.
Before IDEs got widely used and syntax highlighting become mature, class field members was prefixed with underscode, like _aClassMemberField, to help developers to separate member fields from method's variables. Today this is not necessary any more. However, when an existing code is modified, the file's existing style must be used.
Legacy code:
class A {
private _field;
}
New code:
class A {
private field;
}
dCache uses slf4j logging library as the main log facility. The logger have to be defined as:
public static final Logger LOGGER = LoggerFactory.getLogger(clazz);
Most of the classes will override Object#toString() method. Use guava's MoreObjects.ToStringHelper
@Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("ctime", _ctime)
.add("creationTime", _creationTime)
.add("atime", _atime)
.add("mtime", _mtime)
.add("pnfsId", _pnfsId)
.omitNullValues()
.toString();
}