Skip to content

Commit

Permalink
Switch oslc:maxSize from int to BigInteger
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <[email protected]>
  • Loading branch information
berezovskyi committed May 5, 2022
1 parent 29c1c07 commit 36a5b42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
package org.eclipse.lyo.oslc4j.core.model;

import java.math.BigInteger;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
Expand Down Expand Up @@ -46,7 +47,7 @@ public final class Property extends AbstractResource implements Comparable<Prope
private URI allowedValuesRef;
private String description;
private Boolean hidden;
private Integer maxSize;
private BigInteger maxSize;
private Boolean memberProperty;
private String name;
private Occurs occurs;
Expand Down Expand Up @@ -121,7 +122,7 @@ public String getDescription() {
@OslcPropertyDefinition(OslcConstants.OSLC_CORE_NAMESPACE + "maxSize")
@OslcReadOnly
@OslcTitle("Maximum Size")
public Integer getMaxSize() {
public BigInteger getMaxSize() {
return maxSize;
}

Expand Down Expand Up @@ -289,7 +290,7 @@ public void setHidden(final Boolean hidden) {
this.hidden = hidden;
}

public void setMaxSize(final Integer maxSize) {
public void setMaxSize(final BigInteger maxSize) {
this.maxSize = maxSize;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private static Property createProperty(final String baseURI, final Class<?> reso

final OslcMaxSize maxSizeAnnotation = InheritedMethodAnnotationHelper.getAnnotation(method, OslcMaxSize.class);
if (maxSizeAnnotation != null) {
property.setMaxSize(Integer.valueOf(maxSizeAnnotation.value()));
property.setMaxSize(BigInteger.valueOf(maxSizeAnnotation.value()));
}

final OslcValueShape valueShapeAnnotation = InheritedMethodAnnotationHelper.getAnnotation(method, OslcValueShape.class);
Expand Down

0 comments on commit 36a5b42

Please sign in to comment.