Skip to content

Commit

Permalink
[ delicious-java-Patches-2898278 ] Specify JDK 1.4 during compile and…
Browse files Browse the repository at this point in the history
… [ delicious-java-Patches-2898280 ] Post - missing constructor and hashCode
  • Loading branch information
David Czarnecki committed Jan 10, 2010
1 parent e13653a commit 9483e8a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
distribution/*
.project
.classpath

6 changes: 4 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<project name="delicious" default="compile" basedir=".">

<property name="name" value="delicious"/>
<property name="version" value="1.15"/>
<property name="version" value="1.16"/>

<property name="lib.dir" value="${basedir}/lib"/>
<property name="src.dir" value="${basedir}/src"/>
Expand Down Expand Up @@ -75,7 +75,9 @@
<include name="**/*.tld"/>
</fileset>
</copy>
<javac srcdir="${src.dir}"
<javac source="1.4"
target="1.4"
srcdir="${src.dir}"
destdir="${compile.dir}"
debug="on"
deprecation="on"
Expand Down
Binary file removed distribution/delicious-1.15.jar
Binary file not shown.
24 changes: 24 additions & 0 deletions src/del/icio/us/beans/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ public Post(String href, String description, String extended, String hash, Strin
this.shared = shared;
this.others = others;
}

/**
* Construct a new Post
*
* @param href Link
* @param description Description of link
* @param hash Hash of link
* @param tag Space-delimited set of tags
* @param time Time when link added
* @param shared Whether or not the post is shared
*/
public Post(String href, String description, String extended, String hash, String tag, String time, boolean shared) {
this(href, description, extended, hash, tag, time, shared, -1);
}

/**
* Get link of post
Expand Down Expand Up @@ -263,4 +277,14 @@ public boolean equals(Object obj) {

return super.equals(obj);
}

/**
* Method to calculate hash code based on <code>{@link #getHref()}</code>
*/
public int hashCode() {
int result = 3;
result = 73 * result + (getHref() != null ? getHref().hashCode() : 0);

return result;
}
}

0 comments on commit 9483e8a

Please sign in to comment.