Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » @Nullable not allowed on primitive arrays
@Nullable not allowed on primitive arrays [message #1748297] Mon, 21 November 2016 21:33 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
Why is this not allowed:

import org.eclipse.jdt.annotation.Nullable;
...
	public void append(@Nullable byte[] v){
		if( v == null ) {
			return;
		}
           // ...
	}


?
Or why do I get this error:
The nullness annotation @Nullable is not applicable for the primitive type

Re: @Nullable not allowed on primitive arrays [message #1748298 is a reply to message #1748297] Mon, 21 November 2016 21:47 Go to previous message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
nevermind, i found it:
public void append( byte @Nullable[] v){

so it works
Previous Topic:Eclipse Kepler hospot error
Next Topic:Content Assist in Web Editor
Goto Forum:
  


Current Time: Sat Oct 12 10:41:01 GMT 2024

Powered by FUDForum. Page generated in 0.03411 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top