Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkstyle fixes for async-rest sample. #119

Merged
merged 2 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "java-repo-tools"]
path = java-repo-tools
url = https://github.com/GoogleCloudPlatform/java-repo-tools.git
201 changes: 0 additions & 201 deletions google-checks.xml

This file was deleted.

1 change: 1 addition & 0 deletions java-repo-tools
Submodule java-repo-tools added at 5c9a31
26 changes: 16 additions & 10 deletions managed_vms/async-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
<artifactId>managed-vms-async-rest</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Example Async Rest Webapp</name>

<parent>
<artifactId>doc-samples</artifactId>
<groupId>com.google.cloud</groupId>
<version>1.0.0</version>
<relativePath>../..</relativePath>
</parent>

<properties>
<places.appkey>YOUR_PLACES_APP_KEY</places.appkey>
<jetty.version>9.3.7.v20160115</jetty.version>
Expand All @@ -26,25 +33,24 @@
<version>${jetty.version}</version>
<configuration>
<systemProperties>
<systemProperty>
<systemProperty>
<name>com.google.appengine.demos.asyncrest.appKey</name>
<value>${places.appkey}</value>
</systemProperty>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.96.v20160203</version>
<version>2.0.9.95.v20160203</version>
<configuration>
<gcloud_directory>/usr/local/google-cloud-sdk</gcloud_directory>
<verbosity>debug</verbosity>
<log_level>debug</log_level>
<non_docker_mode>false</non_docker_mode>
<docker_build>remote</docker_build>
<verbosity>debug</verbosity>
<log_level>debug</log_level>
<non_docker_mode>false</non_docker_mode>
<docker_build>remote</docker_build>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.appengine.demos;

import java.io.IOException;
Expand All @@ -13,9 +29,8 @@
public class DumpServlet extends HttpServlet {

@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
response.setStatus(HttpServletResponse.SC_OK);

Expand All @@ -28,19 +43,42 @@ protected void doGet(HttpServletRequest request,
out.printf("getServletContextName=%s%n", getServletContext().getServletContextName());
out.printf("virtualServerName=%s%n", getServletContext().getVirtualServerName());
out.printf("contextPath=%s%n", getServletContext().getContextPath());
out.printf("version=%d.%d%n", getServletContext().getMajorVersion(), getServletContext().getMinorVersion());
out.printf("effectiveVersion=%d.%d%n", getServletContext().getEffectiveMajorVersion(), getServletContext().getEffectiveMinorVersion());
out.printf(
"version=%d.%d%n",
getServletContext().getMajorVersion(),
getServletContext().getMinorVersion());
out.printf(
"effectiveVersion=%d.%d%n",
getServletContext().getEffectiveMajorVersion(),
getServletContext().getEffectiveMinorVersion());
out.println("</pre>");
out.println("<h2>Request Fields:</h2>");
out.println("<pre>");
out.printf("remoteHost/Addr:port=%s/%s:%d%n", request.getRemoteHost(), request.getRemoteAddr(), request.getRemotePort());
out.printf("localName/Addr:port=%s/%s:%d%n", request.getLocalName(), request.getLocalAddr(), request.getLocalPort());
out.printf("scheme=%s method=%s protocol=%s%n", request.getScheme(), request.getMethod(), request.getProtocol());
out.printf(
"remoteHost/Addr:port=%s/%s:%d%n",
request.getRemoteHost(),
request.getRemoteAddr(),
request.getRemotePort());
out.printf(
"localName/Addr:port=%s/%s:%d%n",
request.getLocalName(),
request.getLocalAddr(),
request.getLocalPort());
out.printf(
"scheme=%s method=%s protocol=%s%n",
request.getScheme(),
request.getMethod(),
request.getProtocol());
out.printf("serverName:serverPort=%s:%d%n", request.getServerName(), request.getServerPort());
out.printf("requestURI=%s%n", request.getRequestURI());
out.printf("requestURL=%s%n", request.getRequestURL().toString());
out.printf("contextPath|servletPath|pathInfo=%s|%s|%s%n", request.getContextPath(), request.getServletPath(), request.getPathInfo());
out.printf("session/new=%s/%b%n", request.getSession(true).getId(), request.getSession().isNew());
out.printf(
"contextPath|servletPath|pathInfo=%s|%s|%s%n",
request.getContextPath(),
request.getServletPath(),
request.getPathInfo());
out.printf(
"session/new=%s/%b%n", request.getSession(true).getId(), request.getSession().isNew());
out.println("</pre>");
out.println("<h2>Request Headers:</h2>");
out.println("<pre>");
Expand Down
Loading