ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/tomcat/unittest/TesterResponse.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/tomcat/unittest/TesterResponse.java
Status
scanned
Type
file
Name
TesterResponse.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2297 (2.2 KB)
MD5
41f7324bb750b6378a0eee80756bcb5e
SHA1
6a924775f192b4da67c26d2217dda8b5a376d94d
SHA256
372c20cde32aaa9177cf3a630f7905c7504b18d651c57bec48e94cf5a874571e
SHA512

      
    
SHA1_git
376afd9c0df19f97df0edebf6b281673871c546b
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TesterResponse.java | 2.2 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 org.apache.tomcat.unittest; import java.io.IOException; import org.apache.catalina.connector.Response; /** * Minimal changes to Response to enable tests that use this class to operate * correctly. */ public class TesterResponse extends Response { public TesterResponse() { super(new org.apache.coyote.Response()); } @Override public boolean isCommitted() { return false; } @Override public void sendError(int status, String message) throws IOException { // NO-OP by default. /* System.out.println("TesterResponse.sendError(" + status + ", \"" + message + "\")"); */ } @Override public void resetBuffer(boolean resetWriterStreamFlags) { // NO-OP by default. // There is no buffer created for this test object since no test depends // on one being present or on this method resetting it. } @Override public void setSuspended(boolean suspended) { // NO-OP by default. // There is no buffer created for this test object since no test depends // on one being present or on this method suspending it. } @Override public void reset() { // Minimal implementation for tests that avoids using OutputBuffer if (super.getCoyoteResponse() != null) { super.getCoyoteResponse().reset(); } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
43.91
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9