Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Aug 22, 2023
1 parent 20d41d8 commit 436afbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 4 additions & 5 deletions sitemesh/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ sourceSets.main.java.srcDirs += ['build/generated-sources/jflex']
description = 'SiteMesh library'

dependencies {
testImplementation group: 'junit', name: 'junit', version:'4.5'
testImplementation group: 'org.eclipse.jetty', name: 'jetty-io', version:'8.1.17.v20150415'
testImplementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'11.0.15'
testImplementation group: 'org.eclipse.jetty', name: 'jetty-util', version:'11.0.15'
testImplementation group: 'org.apache.ant', name: 'ant-testutil', version:'1.7.1'
testImplementation 'junit:junit:4.5'
testImplementation 'org.eclipse.jetty:jetty-servlet:11.0.15'
testImplementation 'org.eclipse.jetty:jetty-util:11.0.15'
testImplementation 'org.apache.ant:ant-testutil:1.7.1'

compileOnly 'jakarta.servlet:jakarta.servlet-api:6.0.0'
compileOnly 'org.apache.ant:ant:1.7.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.sitemesh.webapp.WebEnvironment;
import org.sitemesh.builder.SiteMeshFilterBuilder;

Expand All @@ -17,7 +16,6 @@
import java.util.TimeZone;

import junit.framework.TestCase;
//import org.eclipse.jetty.server.HttpFields;

/**
* Tests that HTTP cacheable Servlets behave correctly when decorated.
Expand Down Expand Up @@ -333,8 +331,9 @@ public long getMillis() { // round due to millis not being sent.
return calendar.getTimeInMillis() / 1000 * 1000;
}

public String toHttpHeaderFormat() { // Doesn't sent millis
HttpField lastModified = HttpFields.build().addDateField(HttpHeader.LAST_MODIFIED.asString(), calendar.getTimeInMillis()).getField(HttpHeader.LAST_MODIFIED.asString());
public String toHttpHeaderFormat() {
HttpField lastModified = HttpFields.build().addDateField(HttpHeader.LAST_MODIFIED.asString(),
calendar.getTimeInMillis()).getField(HttpHeader.LAST_MODIFIED);
return lastModified.getValue();
}

Expand Down

0 comments on commit 436afbc

Please sign in to comment.