Skip to content

Commit

Permalink
Removes somes javax annotations (not used anywhere else in the code)
Browse files Browse the repository at this point in the history
AlexisDrogoul committed Sep 29, 2024
1 parent a7e4894 commit 64ee64c
Showing 8 changed files with 186 additions and 200 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*******************************************************************************************************
*
* IImageProvider.java, in gama.core, is part of the source code of the GAMA modeling and simulation platform
* .
* IImageProvider.java, in gama.core, is part of the source code of the GAMA modeling and simulation platform .
*
* (c) 2007-2024 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
@@ -12,8 +11,6 @@

import java.awt.image.BufferedImage;

import javax.annotation.Nonnegative;

import gama.core.common.geometry.Envelope3D;
import gama.core.runtime.IScope;

@@ -29,7 +26,6 @@ public interface IImageProvider extends IEnvelopeProvider, IAsset {
* @param scope
* @return
*/
@Nonnegative
int getRows(IScope scope);

/**
@@ -38,7 +34,6 @@ public interface IImageProvider extends IEnvelopeProvider, IAsset {
* @param scope
* @return
*/
@Nonnegative
int getCols(IScope scope);

/**
6 changes: 0 additions & 6 deletions gama.core/src/gama/core/kernel/experiment/IParameter.java
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@
import java.util.List;
import java.util.Set;

import javax.annotation.Nonnull;

import gama.core.runtime.IScope;
import gama.core.runtime.exceptions.GamaRuntimeException;
import gama.gaml.types.IType;
@@ -177,7 +175,6 @@ public interface ParameterChangeListener {
*
* @return the enablement
*/
@Nonnull
default String[] getEnablement() { return EMPTY_STRINGS; }

/**
@@ -186,7 +183,6 @@ public interface ParameterChangeListener {
*
* @return the disablement
*/
@Nonnull
default String[] getDisablement() { return EMPTY_STRINGS; }

/**
@@ -195,15 +191,13 @@ public interface ParameterChangeListener {
*
* @return the refreshment
*/
@Nonnull
default String[] getRefreshment() { return EMPTY_STRINGS; }

/**
* Gets the file extensions.
*
* @return the file extensions
*/
@Nonnull
default String[] getFileExtensions() { return EMPTY_STRINGS; }

/**
13 changes: 2 additions & 11 deletions gama.core/src/gama/core/util/file/IFieldMatrixProvider.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
/*******************************************************************************************************
*
* IFieldMatrixProvider.java, in gama.core, is part of the source code of the
* GAMA modeling and simulation platform .
* IFieldMatrixProvider.java, in gama.core, is part of the source code of the GAMA modeling and simulation platform .
*
* (c) 2007-2024 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
********************************************************************************************************/
package gama.core.util.file;

import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;

import gama.core.runtime.IScope;
import gama.core.runtime.exceptions.GamaRuntimeException;
import gama.core.util.matrix.GamaField;
@@ -36,7 +32,6 @@ public interface IFieldMatrixProvider {
* @param scope
* @return
*/
@Nonnull
default IField getField(final IScope scope) {
return new GamaField(scope, this);
}
@@ -58,7 +53,6 @@ default double getNoData(final IScope scope) {
* @param scope
* @return
*/
@Nonnegative
int getRows(IScope scope);

/**
@@ -67,7 +61,6 @@ default double getNoData(final IScope scope) {
* @param scope
* @return
*/
@Nonnegative
int getCols(IScope scope);

/**
@@ -77,7 +70,6 @@ default double getNoData(final IScope scope) {
* @return the number of bands.
*/

@Nonnegative
default int getBandsNumber(final IScope scope) {
return 1;
}
@@ -89,7 +81,6 @@ default int getBandsNumber(final IScope scope) {
* @param scope
* @return an array of double, possibly empty, never null
*/
@Nonnull
default double[] getFieldData(final IScope scope) {
return getBand(scope, 0);
}
3 changes: 0 additions & 3 deletions gama.core/src/gama/core/util/matrix/GamaField.java
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@

import java.util.Arrays;

import javax.annotation.Nullable;

import com.google.common.collect.Iterables;
import com.google.common.primitives.Doubles;
@@ -148,7 +147,6 @@ public Double getFromIndicesList(final IScope scope, final IList indices) throws
* grid coordinates is already taken in charge by matrices
*/
@Override
@Nullable
public Double get(final IScope scope, final GamaPoint p) {
computeDimensions(scope);
GamaPoint gp = new GamaPoint(p);
@@ -262,7 +260,6 @@ public java.lang.Iterable<Double> iterable(final IScope scope) {
return Iterables.filter(Doubles.asList(getMatrix()), e -> e != noDataValue);
}

@Nullable
@Override
public IShape getCellShapeAt(final IScope scope, final GamaPoint gp) {
computeDimensions(scope);
3 changes: 0 additions & 3 deletions gama.core/src/gama/core/util/matrix/IField.java
Original file line number Diff line number Diff line change
@@ -9,8 +9,6 @@
********************************************************************************************************/
package gama.core.util.matrix;

import javax.annotation.Nonnull;

import gama.annotations.precompiler.GamlAnnotations.doc;
import gama.annotations.precompiler.GamlAnnotations.getter;
import gama.annotations.precompiler.GamlAnnotations.setter;
@@ -179,7 +177,6 @@ default void setCellSize(final IScope scope, final GamaPoint size) {
* a world location (location of an agent, for instance)
* @return A list of values at this location. Never null nor empty (as there is at least one band).
*/
@Nonnull
IList<Double> getValuesIntersecting(IScope scope, IShape shape);

/**
3 changes: 0 additions & 3 deletions gama.dependencies/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -143,9 +143,6 @@ Export-Package: com.conversantmedia.util.collection,
it.geosolutions.jaiext.warp,
it.geosolutions.jaiext.zonal,
it.geosolutions.rendered.viewer,
javax.annotation,
javax.annotation.concurrent,
javax.annotation.meta,
javax.measure,
javax.measure.format,
javax.measure.quantity,
19 changes: 7 additions & 12 deletions gama.ui.shared/src/gama/ui/shared/parameters/AbstractEditor.java
Original file line number Diff line number Diff line change
@@ -14,9 +14,6 @@

import java.util.Objects;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -62,7 +59,7 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
private final int order = ORDER++;

/** The listener. */
@Nullable private final EditorListener<T> listener;
private final EditorListener<T> listener;

/** The agent. */
private final IAgent agent;
@@ -74,7 +71,7 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
protected String name;

/** The param. */
@Nonnull protected final IParameter param;
protected final IParameter param;

/** The different values. */
// Values
@@ -104,15 +101,13 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
protected EditorsGroup parent;

/** The editor toolbar. */
@SuppressWarnings("rawtypes")
protected EditorToolbar editorToolbar;
@SuppressWarnings ("rawtypes") protected EditorToolbar editorToolbar;

/** The editor label. */
protected EditorLabel editorLabel;

/** The editor control. */
@SuppressWarnings("rawtypes")
protected EditorControl editorControl;
@SuppressWarnings ("rawtypes") protected EditorControl editorControl;

/**
* Instantiates a new abstract editor.
@@ -126,8 +121,7 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
* @param l
* the l
*/
public AbstractEditor(@Nonnull final IAgent a, @Nonnull final IParameter parameter,
@Nullable final EditorListener<T> l) {
public AbstractEditor(final IAgent a, final IParameter parameter, final EditorListener<T> l) {
param = parameter;
agent = a;
if (agent == null) throw GamaRuntimeException.error("The parameters view cannot be opened.", a.getScope());
@@ -370,7 +364,7 @@ EditorToolbar createEditorToolbar() {
*
* @return the editor control
*/
@SuppressWarnings("rawtypes")
@SuppressWarnings ("rawtypes")
EditorControl createEditorControl() {
boolean isCombo = param.getAmongValue(getScope()) != null;
boolean isEditable = param.isEditable();
@@ -681,6 +675,7 @@ public void dispose() {
* @return true, if is disposed
* @date 21 févr. 2024
*/
@Override
public boolean isDisposed() {
if (editorLabel != null && editorLabel.isDisposed() || editorControl != null && editorControl.isDisposed())
return true;

0 comments on commit 64ee64c

Please sign in to comment.