Skip to main content
edited title
Link
serv-inc
  • 38.8k
  • 9
  • 195
  • 215

IDE independantindependent @Nullable annotation

Post Closed as "Duplicate" by Jeroen Steenbeeke, Mark Rotteveel java
added 184 characters in body
Source Link
gillesB
  • 1.2k
  • 1
  • 16
  • 34

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant, see also: What is the status of JSR 305?.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize their own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize their own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant, see also: What is the status of JSR 305?.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize their own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.
edited body
Source Link
gillesB
  • 1.2k
  • 1
  • 16
  • 34

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize theretheir own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize there own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.

After detecting a NPE while testing, I finally wanted to take a look at @Nullable annotations.

After a small internet search there seems to be a @Nullable annotation for every IDE or environment:

I have seen that they seem all to follow JSR-305, which describes this annotation. But the JSR is dormant.

So I have two questions:

  • Is there another general annotation which can be used?
  • If no, do the IDEs only recognize their own annotations.
    • E.g. would it be possible to use the Spring annotations in a non-Spring-project, and Eclipse and IntelliJ can handle the annotation correctly.
Source Link
gillesB
  • 1.2k
  • 1
  • 16
  • 34
Loading