Skip to main content
0 votes
0 answers
59 views

I have code that has two warnings. The code is from a commandline Expense manager project that uses a List to save and access expenses. Saving and retrieving the List is done via serialisation and ...
Andruid929's user avatar
1 vote
0 answers
322 views

I read that the usage of @jakarta.validation.constraints.Pattern should be used on return types of Charsequence. The issue that I am facing is that in my case, I am using generated java files from ...
Omar El Hussein's user avatar
4 votes
3 answers
332 views

I wanted to extend a bit of code that processes annotations to also support the Nullable annotation from the Checker Framework. To my surprise, this didn't work. Upon further inspection, it seems like ...
knittl's user avatar
  • 269k
0 votes
2 answers
311 views

I am having a null analysis issue when compiling GriefPrevention in Eclipse. For example, line 304 in PlayerEventHandler.java invokes Player#getLocation(). The API specification for this class can be ...
Zhro's user avatar
  • 2,654
8 votes
1 answer
586 views

I want to create method level annotations & generate code for it. I want to avoid using AspectJ and would prefer a compile time code generator so that if I've to ever debug the code I can actually ...
user1692342's user avatar
  • 5,277
-4 votes
2 answers
217 views

I have @SuppressWarnings("javadoc") on almost every class. My IDE gives me a warning on virtually all of them: "Redundant suppression". I assume advances in technology have made ...
peer's user avatar
  • 4,831
0 votes
2 answers
992 views

@ConditionalOnProperty works straight forward, depending upon this property is present (and/or value is correct), condition will result into true or false. But can someone explain how @...
Anurag's user avatar
  • 21
0 votes
1 answer
64 views

I'm working with several tables that have multiple fields sharing common characteristics, such as attributes like length and nullability. For instance, the field Username remains consistent across ...
MiguelSlv's user avatar
  • 15.4k
0 votes
1 answer
53 views

I have following annotation interface: @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented public @interface MockToken { String user() ...
jd466's user avatar
  • 578
0 votes
1 answer
776 views

At my org we extensively use @Value.Immutable annotation with interfaces or abstract classes to generate Immutable classes with builders for our internal data transfer objects (DTOs) [ref]. We are ...
y2k-shubham's user avatar
  • 11.8k
-1 votes
1 answer
353 views

I want to write an annotation that can change the parameter value to some default if it is null. For example: static void myMethod(@NullToDefault String param) { System.out.println(param); } ...
gad_gadskiy's user avatar
1 vote
1 answer
659 views

We're trying to add "Nullaway" (https://github.com/uber/NullAway) to our repo. This is a tool that assumes everything not annotated with @Nullable can't be null and enforces it in compile ...
user1700773's user avatar
1 vote
0 answers
541 views

I want to add an annotation to my controller methods that is used to check if the user can perform an action or access a piece of data before the controller method is called. I want to be able to ...
Marsh's user avatar
  • 8,165
0 votes
0 answers
105 views

We have a wrapper class for checking the Android SDK version, and it uses the ChecksSdkIntAtLeast annotation. Here's a trimmed example of the class with just one getter and the logging removed: class ...
StormFoo's user avatar
  • 1,199
0 votes
0 answers
131 views

I was looking into annotations but wasn't able to grasp how annotations actually work. So I tried to break my problem as follows: Lets suppose I have a spring boot project that is used as a ...
Stotra's user avatar
  • 103

15 30 50 per page
1
2 3 4 5
15