New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TradeInfo should not be null #1722

Merged
merged 1 commit into from Jun 8, 2018
Jump to file or symbol
Failed to load files and symbols.
+137 −83
Diff settings

Always

Just for now

@@ -42,7 +42,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The security that was traded.
@@ -163,7 +163,7 @@ public Currency getCurrency() {
/**
* Creates an instance.
* @param info the value of the property
* @param info the value of the property, not null
* @param security the value of the property, not null
* @param quantity the value of the property
* @param price the value of the property
@@ -173,6 +173,7 @@ public Currency getCurrency() {
GenericSecurity security,
double quantity,
double price) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(security, "security");
this.info = info;
this.security = security;
@@ -190,7 +191,7 @@ public Currency getCurrency() {
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -500,10 +501,11 @@ public GenericSecurityTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -45,7 +45,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The identifier of the security that was traded.
@@ -145,7 +145,7 @@ public SecurityTrade withPrice(double price) {
/**
* Creates an instance.
* @param info the value of the property
* @param info the value of the property, not null
* @param securityId the value of the property, not null
* @param quantity the value of the property
* @param price the value of the property
@@ -155,6 +155,7 @@ public SecurityTrade withPrice(double price) {
SecurityId securityId,
double quantity,
double price) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(securityId, "securityId");
this.info = info;
this.securityId = securityId;
@@ -172,7 +173,7 @@ public SecurityTrade withPrice(double price) {
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -484,10 +485,11 @@ public SecurityTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -49,7 +49,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The cap/floor product that was agreed when the trade occurred.
@@ -158,6 +158,7 @@ private IborCapFloorTrade(
TradeInfo info,
IborCapFloor product,
AdjustablePayment premium) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -174,7 +175,7 @@ private IborCapFloorTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -447,10 +448,11 @@ public IborCapFloorTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -48,7 +48,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The resolved Ibor cap/floor product.
@@ -104,6 +104,7 @@ private ResolvedIborCapFloorTrade(
TradeInfo info,
ResolvedIborCapFloor product,
Payment premium) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -120,7 +121,7 @@ private ResolvedIborCapFloorTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -393,10 +394,11 @@ public ResolvedIborCapFloorTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -49,7 +49,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The CMS product that was agreed when the trade occurred.
@@ -158,6 +158,7 @@ private CmsTrade(
TradeInfo info,
Cms product,
AdjustablePayment premium) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -174,7 +175,7 @@ private CmsTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -447,10 +448,11 @@ public CmsTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -48,7 +48,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The resolved CMS product.
@@ -104,6 +104,7 @@ private ResolvedCmsTrade(
TradeInfo info,
ResolvedCms product,
Payment premium) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -120,7 +121,7 @@ private ResolvedCmsTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -393,10 +394,11 @@ public ResolvedCmsTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -50,7 +50,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The Ibor fixing deposit product that was agreed when the trade occurred.
@@ -127,6 +127,7 @@ public ResolvedIborFixingDepositTrade resolve(ReferenceData refData) {
private IborFixingDepositTrade(
TradeInfo info,
IborFixingDeposit product) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -142,7 +143,7 @@ private IborFixingDepositTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -372,10 +373,11 @@ public IborFixingDepositTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -46,7 +46,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The resolved Ibor Fixing Deposit product.
@@ -102,6 +102,7 @@ private static void applyDefaults(Builder builder) {
private ResolvedIborFixingDepositTrade(
TradeInfo info,
ResolvedIborFixingDeposit product) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -117,7 +118,7 @@ private ResolvedIborFixingDepositTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -347,10 +348,11 @@ public ResolvedIborFixingDepositTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
@@ -49,7 +49,7 @@
* <p>
* This allows additional information to be attached to the trade.
*/
@PropertyDefinition(overrideGet = true)
@PropertyDefinition(validate = "notNull", overrideGet = true)
private final TradeInfo info;
/**
* The term deposit product that was agreed when the trade occurred.
@@ -135,6 +135,7 @@ public ResolvedTermDepositTrade resolve(ReferenceData refData) {
private TermDepositTrade(
TradeInfo info,
TermDeposit product) {
JodaBeanUtils.notNull(info, "info");
JodaBeanUtils.notNull(product, "product");
this.info = info;
this.product = product;
@@ -150,7 +151,7 @@ private TermDepositTrade(
* Gets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @return the value of the property
* @return the value of the property, not null
*/
@Override
public TradeInfo getInfo() {
@@ -380,10 +381,11 @@ public TermDepositTrade build() {
* Sets the additional trade information, defaulted to an empty instance.
* <p>
* This allows additional information to be attached to the trade.
* @param info the new value
* @param info the new value, not null
* @return this, for chaining, not null
*/
public Builder info(TradeInfo info) {
JodaBeanUtils.notNull(info, "info");
this.info = info;
return this;
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.