Permalink
Browse files

Added minimal style checks: licence header, file length, illegal imports

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk@1425284 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 7ae0401 commit bf40506949d422eac7753bbd6a00658195175ec6 @ok2c ok2c committed Dec 22, 2012
Showing with 183 additions and 106 deletions.
  1. +26 −0 asl2.header
  2. +44 −0 hc-checkstyle.xml
  3. +0 −3 httpcore-nio/src/main/java/org/apache/http/nio/reactor/SessionBufferStatus.java
  4. +1 −1 httpcore-nio/src/test/java/org/apache/http/impl/nio/TestContentChannel.java
  5. +0 −2 httpcore/src/main/java/org/apache/http/HttpEntityEnclosingRequest.java
  6. +14 −13 httpcore/src/main/java/org/apache/http/annotation/GuardedBy.java
  7. +14 −13 httpcore/src/main/java/org/apache/http/annotation/Immutable.java
  8. +14 −13 httpcore/src/main/java/org/apache/http/annotation/NotThreadSafe.java
  9. +14 −13 httpcore/src/main/java/org/apache/http/annotation/ThreadSafe.java
  10. +1 −1 httpcore/src/main/java/org/apache/http/params/SyncBasicHttpParams.java
  11. +14 −14 httpcore/src/main/java/org/apache/http/pool/PoolEntryFuture.java
  12. +14 −14 httpcore/src/main/java/org/apache/http/pool/RouteSpecificPool.java
  13. +1 −1 httpcore/src/main/java/org/apache/http/protocol/ImmutableHttpProcessor.java
  14. +0 −1 httpcore/src/test/java/org/apache/http/entity/TestContentType.java
  15. +0 −5 httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
  16. +0 −1 httpcore/src/test/java/org/apache/http/message/TestAbstractMessage.java
  17. +0 −1 httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java
  18. +0 −1 httpcore/src/test/java/org/apache/http/message/TestBasicHeaderIterator.java
  19. +0 −3 httpcore/src/test/java/org/apache/http/message/TestBasicHeaderValueFormatter.java
  20. +0 −3 httpcore/src/test/java/org/apache/http/message/TestBasicHeaderValueParser.java
  21. +0 −3 httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java
  22. +26 −0 pom.xml
View
@@ -0,0 +1,26 @@
+/*
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
View
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+ <module name="TreeWalker">
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport" />
+ <module name="RedundantImport" />
+ </module>
+ <module name="Header">
+ <property name="headerFile" value="asl2.header" />
+ </module>
+ <module name="FileLength">
+ <property name="max" value="3000" />
+ </module>
+ <!--<module name="FileTabCharacter">
+ <property name="eachLine" value="true"/>
+ </module>
+ <module name="RegexpSingleline">
+ <property name="format" value="[ \t]+$"/>
+ <property name="message" value="Trailing whitespace"/>
+ </module>
+ -->
+</module>
@@ -1,6 +1,4 @@
/*
- * $Date:
- *
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -26,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.nio.reactor;
/**
@@ -26,9 +26,9 @@
*/
package org.apache.http.impl.nio;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import static org.junit.Assert.*;
import java.nio.ByteBuffer;
@@ -1,5 +1,4 @@
/*
- * $Header: $
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -25,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http;
/**
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -22,8 +22,8 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
-
package org.apache.http.params;
import org.apache.http.annotation.ThreadSafe;
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -23,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.pool;
import java.io.IOException;
@@ -1,20 +1,21 @@
/*
* ====================================================================
+ * 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
*
- * 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
*
- * 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.
+ * 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
@@ -23,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.pool;
import java.util.HashSet;
@@ -22,8 +22,8 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
-
package org.apache.http.protocol;
import java.io.IOException;
@@ -31,7 +31,6 @@
import org.apache.http.Header;
import org.apache.http.ParseException;
-import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.message.BasicHeader;
import org.junit.Assert;
import org.junit.Test;
@@ -1,8 +1,4 @@
/*
- * $HeadURL$
- * $Revision$
- * $Date$
- *
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -28,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.impl.io;
import java.io.InterruptedIOException;
@@ -24,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.message;
import org.apache.http.Header;
@@ -24,7 +24,6 @@
* <http://www.apache.org/>.
*
*/
-
package org.apache.http.message;
import java.util.NoSuchElementException;
Oops, something went wrong.

0 comments on commit bf40506

Please sign in to comment.