Skip to content

Commit

Permalink
Making API model serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Apr 24, 2016
1 parent db88873 commit 0e0ce5e
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 10 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
Changelog of Git Changelog.

## Next release
### Other changes

**Making API model serializable**


[63fbadfe4b91659](https://github.com/tomasbjerre/git-changelog-lib/commit/63fbadfe4b91659) Tomas Bjerre *2016-04-24 07:29:27*


## 1.45
### GitHub [#26](https://github.com/tomasbjerre/git-changelog-lib/issues/26) Excluded commits are included JENKINS-34156

**Including correct commits + performance**

* Found major performance problem when sorting tags by commit time, fixed.
* Now not following parents, unless *from* is merged into them.

[f705914a7c62ac7](https://github.com/tomasbjerre/git-changelog-lib/commit/f705914a7c62ac7) Tomas Bjerre *2016-04-13 18:27:53*
[e3106df640b693b](https://github.com/tomasbjerre/git-changelog-lib/commit/e3106df640b693b) Tomas Bjerre *2016-04-13 18:30:26*


### Jira JENKINS-34156
Expand All @@ -20,7 +29,7 @@ Changelog of Git Changelog.
* Found major performance problem when sorting tags by commit time, fixed.
* Now not following parents, unless *from* is merged into them.

[f705914a7c62ac7](https://github.com/tomasbjerre/git-changelog-lib/commit/f705914a7c62ac7) Tomas Bjerre *2016-04-13 18:27:53*
[e3106df640b693b](https://github.com/tomasbjerre/git-changelog-lib/commit/e3106df640b693b) Tomas Bjerre *2016-04-13 18:30:26*


## 1.44
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/Author.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package se.bjurr.gitchangelog.api.model;

import java.io.Serializable;
import java.util.List;

import se.bjurr.gitchangelog.api.model.interfaces.ICommits;

public class Author implements ICommits {
public class Author implements ICommits, Serializable {
private static final long serialVersionUID = -672028657732998142L;
private final List<Commit> commits;
private final String authorName;
private final String authorEmail;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/Changelog.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import static com.google.common.base.Preconditions.checkNotNull;

import java.io.Serializable;
import java.util.List;

import se.bjurr.gitchangelog.api.model.interfaces.IAuthors;
import se.bjurr.gitchangelog.api.model.interfaces.ICommits;
import se.bjurr.gitchangelog.api.model.interfaces.IIssues;

public class Changelog implements ICommits, IAuthors, IIssues {
public class Changelog implements ICommits, IAuthors, IIssues, Serializable {
private static final long serialVersionUID = 2193789018496738737L;
private final List<Commit> commits;
private final List<Tag> tags;
private final List<Author> authors;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/Commit.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Lists.newArrayList;

import java.io.Serializable;
import java.util.List;

import com.google.common.annotations.VisibleForTesting;

public class Commit {
public class Commit implements Serializable {
private static final long serialVersionUID = 6622555148468372816L;
private final String authorName;
private final String authorEmailAddress;
private final String commitTime;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/Issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.common.base.Strings.nullToEmpty;

import java.io.Serializable;
import java.util.List;

import se.bjurr.gitchangelog.api.model.interfaces.IAuthors;
import se.bjurr.gitchangelog.api.model.interfaces.ICommits;

public class Issue implements ICommits, IAuthors {
public class Issue implements ICommits, IAuthors, Serializable {
private static final long serialVersionUID = -7571341639024417199L;
private final List<Commit> commits;
private final List<Author> authors;
/**
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/IssueType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

import static com.google.common.base.Preconditions.checkNotNull;

import java.io.Serializable;
import java.util.List;

public class IssueType {
public class IssueType implements Serializable {

private static final long serialVersionUID = 8850522973130773606L;
private final String name;
private final List<Issue> issues;

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/se/bjurr/gitchangelog/api/model/Tag.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package se.bjurr.gitchangelog.api.model;

import java.io.Serializable;
import java.util.List;

import se.bjurr.gitchangelog.api.model.interfaces.IAuthors;
import se.bjurr.gitchangelog.api.model.interfaces.ICommits;
import se.bjurr.gitchangelog.api.model.interfaces.IIssues;

public class Tag implements ICommits, IAuthors, IIssues {
public class Tag implements ICommits, IAuthors, IIssues, Serializable {
private static final long serialVersionUID = 2140208294219785889L;
private final List<Commit> commits;
private final List<Author> authors;
private final List<Issue> issues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.DEFAULT_TIMEZONE;
import static se.bjurr.gitchangelog.api.GitChangelogApiConstants.DEFAULT_UNTAGGED_NAME;

import java.io.Serializable;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
Expand All @@ -30,7 +31,9 @@
import com.google.common.io.Resources;
import com.google.gson.Gson;

public class Settings {
public class Settings implements Serializable {
private static final long serialVersionUID = 4565886594381385244L;

private static Gson gson = new Gson();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import static com.google.common.base.Optional.fromNullable;
import static com.google.common.base.Preconditions.checkNotNull;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.CUSTOM;

import java.io.Serializable;

import se.bjurr.gitchangelog.api.model.Issue;

import com.google.common.base.Optional;

public class SettingsIssue {
public class SettingsIssue implements Serializable {
private static final long serialVersionUID = -658106272421601880L;
/**
* Use {@link SettingsIssueType#CUSTOM} when adding custom issues.
*/
Expand Down

0 comments on commit 0e0ce5e

Please # to comment.