Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
langfingaz committed Jan 31, 2021
1 parent 15e2ecc commit 1625640
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/wahlzeit/model/PhotoManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected Photo doGetPhotoFromId(PhotoId id) {
}

/**
*
* this.getPhotoFromID -> this.readObject -> this.createObject
*/
protected Photo createObject(ResultSet rset) throws SQLException {
return PhotoFactory.getInstance().createPhoto(rset);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/wahlzeit/model/PhotoUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected static void assertIsValidImage(Image image) {
}

/**
*
* @methodtype assertion
*/
protected static void assertHasValidSize(int cw, int ch) {
if (PhotoSize.THUMB.isWiderAndHigher(cw, ch)) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/wahlzeit/model/landscape/LandscapeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public LandscapeType getSuperType() {
}


/**
* Tests whether one type is a subtype of another. Any type is considered to be a subtype of itself.
*/
public boolean isSubtype(LandscapeType superType){
AssertArgument.notNull(superType);
return doIsSubtype(superType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public void testIsSubtype() {
LandscapeType alps = LandscapeManager.getLandscapeType("alps", mountains);
LandscapeType zugspitze = LandscapeManager.getLandscapeType("zugspitze", alps);

// Any type is considered to be a subtype of itself.
assertTrue(generalLandscape.isSubtype(generalLandscape));
assertTrue(alps.isSubtype(alps));

assertTrue(alps.isSubtype(mountains));
assertTrue(zugspitze.isSubtype(mountains));
Expand Down

0 comments on commit 1625640

Please sign in to comment.