trivial fixes
integrated (hopefully) all required changes from dnet40
codebase used to migrate to java8 the production system