From 4b3f07e90ea497164aaf9cc00591e8e0f868f83b Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Wed, 7 Dec 2016 13:27:01 -0500 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-6441 https://issues.apache.org/jira/browse/AMQ-6526 Adding missing license headers --- .../stomp/StompNIOSSLLargeMessageTest.java | 35 ++++++++++++++----- .../org/apache/activemq/util/LargeFile.java | 26 +++++++++++--- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompNIOSSLLargeMessageTest.java b/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompNIOSSLLargeMessageTest.java index d6007283ac..1cfbc380c6 100644 --- a/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompNIOSSLLargeMessageTest.java +++ b/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompNIOSSLLargeMessageTest.java @@ -1,3 +1,19 @@ +/** + * 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.activemq.transport.stomp; import static org.junit.Assert.*; @@ -39,6 +55,7 @@ public class StompNIOSSLLargeMessageTest extends StompTestSupport { // custom Log4J appender so we can filter the logging output in this test. protected Appender appender = new DefaultTestAppender() { //@Override + @Override public void doAppend(org.apache.log4j.spi.LoggingEvent event) { if (event.getMessage().toString().contains("") && event.getMessage().toString().contains("The maximum data length was exceeded")) { @@ -93,13 +110,13 @@ public class StompNIOSSLLargeMessageTest extends StompTestSupport { * Sends a Stomp message larger than maxDataLength bytes. * Expects to receive an exception from the broker. * The broker will throw an Stomp ProtocolException of type - * "Exception occurred processing: SEND -> - * org.apache.activemq.transport.stomp.ProtocolException: + * "Exception occurred processing: SEND -> + * org.apache.activemq.transport.stomp.ProtocolException: * The maximum data length was exceeded" - * - * Before bug AMQ-6526 this exception would contain \ for the + * + * Before bug AMQ-6526 this exception would contain \ for the * operation name. With the fix it should print the Stomp operation. - * + * * @throws Exception */ @Test(timeout = 6000000) @@ -130,9 +147,9 @@ public class StompNIOSSLLargeMessageTest extends StompTestSupport { /** - * Creates a large byte buffer and fills it with char 'X' except for the + * Creates a large byte buffer and fills it with char 'X' except for the * last byte, it gets value 0x0 assigned. - * + * * @param size - the size of the array to be created. * @return */ @@ -141,9 +158,9 @@ public class StompNIOSSLLargeMessageTest extends StompTestSupport { for (int i=0; i