Java - nimrody/knowledgebase GitHub Wiki
Packaging java apps
-
Hermetic Java https://cr.openjdk.org/~jiangli/hermetic_java.pdf
-
Jib - https://github.com/GoogleContainerTools/jib - build containers without docker (for java)
Misc
Spring framework
Other
Testing
-
Approval Tests Testing framework that generates reference by running the test and recording the result
Logging
-
OQL - visualvm heap dump query language tutorial
For example to find all strings containing liveCatalog:
select {instance: s, content: s.toString()} from java.lang.String s where /liveCatalog/.test(s.toString())
To get static fields of a class
select heap.findClass("server.Backend").statics.pusher
Count objects of specific class:
select count(heap.objects("reports.model.EventWithHeader"))
Get retained size of all objects of type
select sum(heap.objects("reports.model.EventWithHeader"), function(it) { return rsizeof(it); })
Java parsers
JNI
-
-
BaseType Character Type Interpretation B byte signed byte C char Unicode character code point in the Basic Multilingual Plane, encoded with UTF-16 D double double-precision floating-point value F float single-precision floating-point value I int integer J long long integer L ClassName ; reference an instance of class ClassName S short signed short Z boolean true or false [ reference one array dimension
-
Gradle build
-
Another zlib implementation suitable for flushing contents
Some information on Gzip implementation and the Deflate format
-
Proycon - Decompiler and code generator (see also Lutyen) (dex to jar: jadx)
-
Awesome Java - libraries(https://github.com/shyiko/awesome-java)
-
Reading from resource
public static Schema getAvroSchema(String schemaFileName) throws IOException { try (InputStream is = ClassLoader.getSystemResourceAsStream(schemaFileName)) { Schema schema = new Schema.Parser().setValidate(true).parse(is); return schema; } }
Libraries
-
Java parser and Java symbol solver for analysing Java code.
SQL Libraries/ORM
Mockito
nullable(String.class)
to check for String or null