You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2011/11/10 07:12:08 UTC
svn commit: r1200174 - in
/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector:
CoyoteAdapter.java CoyoteInputStream.java CoyoteOutputStream.java
CoyotePrincipal.java CoyoteReader.java CoyoteWriter.java
Author: kkolinko
Date: Thu Nov 10 06:12:08 2011
New Revision: 1200174
URL: http://svn.apache.org/viewvc?rev=1200174&view=rev
Log:
Merged revision 1187753 from tomcat/trunk:
Clean-up. No functional change.
Part 2.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyotePrincipal.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteReader.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteWriter.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Nov 10 06:12:08 2011
@@ -14,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.catalina.connector;
import java.io.IOException;
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java Thu Nov 10 06:12:08 2011
@@ -5,17 +5,15 @@
* 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.catalina.connector;
import java.io.IOException;
@@ -29,7 +27,7 @@ import org.apache.catalina.security.Secu
/**
* This class handles reading bytes.
- *
+ *
* @author Remy Maucherat
* @author Jean-Francois Arcand
*/
@@ -80,11 +78,11 @@ public class CoyoteInputStream
@Override
public int read()
- throws IOException {
+ throws IOException {
if (SecurityUtil.isPackageProtectionEnabled()){
-
+
try{
- Integer result =
+ Integer result =
AccessController.doPrivileged(
new PrivilegedExceptionAction<Integer>(){
@@ -111,10 +109,10 @@ public class CoyoteInputStream
@Override
public int available() throws IOException {
-
+
if (SecurityUtil.isPackageProtectionEnabled()){
try{
- Integer result =
+ Integer result =
AccessController.doPrivileged(
new PrivilegedExceptionAction<Integer>(){
@@ -136,21 +134,21 @@ public class CoyoteInputStream
}
} else {
return ib.available();
- }
+ }
}
@Override
public int read(final byte[] b) throws IOException {
-
+
if (SecurityUtil.isPackageProtectionEnabled()){
try{
- Integer result =
+ Integer result =
AccessController.doPrivileged(
new PrivilegedExceptionAction<Integer>(){
@Override
public Integer run() throws IOException{
- Integer integer =
+ Integer integer =
Integer.valueOf(ib.read(b, 0, b.length));
return integer;
}
@@ -167,23 +165,23 @@ public class CoyoteInputStream
}
} else {
return ib.read(b, 0, b.length);
- }
+ }
}
@Override
public int read(final byte[] b, final int off, final int len)
throws IOException {
-
+
if (SecurityUtil.isPackageProtectionEnabled()){
try{
- Integer result =
+ Integer result =
AccessController.doPrivileged(
new PrivilegedExceptionAction<Integer>(){
@Override
public Integer run() throws IOException{
- Integer integer =
+ Integer integer =
Integer.valueOf(ib.read(b, off, len));
return integer;
}
@@ -200,7 +198,7 @@ public class CoyoteInputStream
}
} else {
return ib.read(b, off, len);
- }
+ }
}
@@ -210,14 +208,14 @@ public class CoyoteInputStream
}
- /**
+ /**
* Close the stream
* Since we re-cycle, we can't allow the call to super.close()
* which would permanently disable us.
*/
@Override
public void close() throws IOException {
-
+
if (SecurityUtil.isPackageProtectionEnabled()){
try{
AccessController.doPrivileged(
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java Thu Nov 10 06:12:08 2011
@@ -5,17 +5,15 @@
* 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.catalina.connector;
import java.io.IOException;
@@ -24,11 +22,11 @@ import javax.servlet.ServletOutputStream
/**
* Coyote implementation of the servlet output stream.
- *
+ *
* @author Costin Manolache
* @author Remy Maucherat
*/
-public class CoyoteOutputStream
+public class CoyoteOutputStream
extends ServletOutputStream {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyotePrincipal.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyotePrincipal.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyotePrincipal.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyotePrincipal.java Thu Nov 10 06:12:08 2011
@@ -5,17 +5,15 @@
* 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.catalina.connector;
import java.io.Serializable;
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteReader.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteReader.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteReader.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteReader.java Thu Nov 10 06:12:08 2011
@@ -5,17 +5,15 @@
* 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.catalina.connector;
import java.io.BufferedReader;
@@ -24,7 +22,7 @@ import java.io.IOException;
/**
* Coyote implementation of the buffered reader.
- *
+ *
* @author Remy Maucherat
*/
public class CoyoteReader
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteWriter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteWriter.java?rev=1200174&r1=1200173&r2=1200174&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteWriter.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteWriter.java Thu Nov 10 06:12:08 2011
@@ -5,17 +5,15 @@
* 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.catalina.connector;
import java.io.IOException;
@@ -23,7 +21,7 @@ import java.io.PrintWriter;
/**
* Coyote implementation of the servlet writer.
- *
+ *
* @author Remy Maucherat
*/
public class CoyoteWriter
@@ -92,8 +90,9 @@ public class CoyoteWriter
@Override
public void flush() {
- if (error)
+ if (error) {
return;
+ }
try {
ob.flush();
@@ -129,8 +128,9 @@ public class CoyoteWriter
@Override
public void write(int c) {
- if (error)
+ if (error) {
return;
+ }
try {
ob.write(c);
@@ -144,8 +144,9 @@ public class CoyoteWriter
@Override
public void write(char buf[], int off, int len) {
- if (error)
+ if (error) {
return;
+ }
try {
ob.write(buf, off, len);
@@ -165,8 +166,9 @@ public class CoyoteWriter
@Override
public void write(String s, int off, int len) {
- if (error)
+ if (error) {
return;
+ }
try {
ob.write(s, off, len);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org