Jimfs
Error Prone
Jimfs | Error Prone | |
---|---|---|
5 | 16 | |
2,380 | 6,724 | |
0.3% | 0.4% | |
8.5 | 9.4 | |
about 17 hours ago | 6 days ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Jimfs
-
How to write unit tests in C++ relying on non-code files?
Java has in-memory file systems that are essentially geared for this exact use case, eg jimfs[0]. You create your filesystem and any files you need when your tests are starting up, and your classes talk to them rather than the “real” ones. Maybe a similar project exists for the C++ ecosystem?
[0] https://github.com/google/jimfs
- An in-memory file system for Java
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
Recently been using JIMFS. Made my tests much faster and cleaner!
- An in memory file system
-
Working and unit testing with temporary files in Java
I use Google's JIMFS "Just In Memory Filesystem" https://github.com/google/jimfs in my unit tests and have been very happy. No need to clean something up that disappears as soon as the test is over. Let's you create unix or windows style filesystems and I've used it to test a disk space healthcheck because you can set a limit to the size of the filesystem it creates. Very flexible and easy to use.
Error Prone
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
error-prone is good for some extra static analysis.
-
How to use Java Records
A special kind of validation is enforcing that record fields are not null. (Un)fortunately, records do not have any special behavior regarding nullability. You can use tools like NullAway or Error Prone to prevent null in your code in general, or you can add checks to your records:
- Prusti: Static Analyzer for Rust
-
Why is `suspend` a language keyword, but @Composable and @Serializable are annotations
I am all in favour to more third side libraries adding functionalities, like Lombok, Manifold and error prone. As well as smaller projects like this shameless plug and what appears in this list
-
Picnic loves Error Prone: producing high-quality and consistent Java code
If only Google didn't suck when it came to Java9+ support... https://github.com/google/error-prone/issues/2649
-
What does the future hold for Project Amber?
I haven't used it. I use Google's ErrorProne + Lombok to prevent NPEs in java.
-
Plans for Compile-time Null Pointer Safety?
Take a look at NullAway, a plugin for Error Prone.
-
What I miss in Java, the perspective of a Kotlin developer
For some of this stuff, there are compiler extensions that allow extra type checking to be added e.g. Google Error-Prone: https://github.com/google/error-prone with stuff like: https://errorprone.info/bugpattern/ReturnMissingNullable.
Doesn't help you with third party libraries, but across an org applying that rule (and others!) typically ensures some consistency.
-
A guide on how to improve your coding skills with static code analysis.
How to build a static analysis plugin. Google has a framework for Java with a good tutorial.
- Error Prone 2.11.0 Released. Requires JDK11+
What are some alternatives?
Modern Java - A Guide to Java 8 - Modern Java - A Guide to Java 8
Spotbugs - SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.
Lanterna - Java library for creating text-based GUIs
SonarQube - Continuous Inspection
OpenRefine - OpenRefine is a free, open source power tool for working with messy data and improving it
PMD - An extensible multilanguage static code analyzer.
Joda-Money - Java library to represent monetary amounts.
Checkstyle - Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.
LightAdmin - [PoC] Pluggable CRUD UI library for Java web applications
FindBugs - The new home of the FindBugs project
Codename One - Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
infer - A static analyzer for Java, C, C++, and Objective-C