Skip to content

Commit

Permalink
[NONE] Add null checks within constructors of *Support classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nyssen committed May 4, 2015
1 parent 0717c43 commit 2b85535
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public class AdaptableSupport<A extends IAdaptable> implements IDisposable {
* unset.
*/
public AdaptableSupport(A source, PropertyChangeSupport pcs) {
if (source == null) {
throw new IllegalArgumentException("source may not be null.");
}
if (pcs == null) {
throw new IllegalArgumentException("pcs may not be null.");
}
this.source = source;
this.pcs = pcs;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public class PropertyStoreSupport {
private PropertyChangeSupport pcs;

public PropertyStoreSupport(IPropertyStore source, PropertyChangeSupport pcs) {
if (source == null) {
throw new IllegalArgumentException("source may not be null.");
}
if (pcs == null) {
throw new IllegalArgumentException("pcs may not be null.");
}
this.pcs = pcs;
}

Expand Down

0 comments on commit 2b85535

Please sign in to comment.