diff options
Diffstat (limited to 'java/broker/src/main')
12 files changed, 181 insertions, 25 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java b/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java index 25ec0c3a2d..222e341b1a 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java +++ b/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java @@ -222,7 +222,6 @@ public class DestWildExchange extends AbstractExchange { _logger.warn("No queues found for routing key " + routingKey); _logger.warn("Routing map contains: " + _routingKey2queues); - //todo Check for valid topic - mritchie return; } } @@ -288,7 +287,7 @@ public class DestWildExchange extends AbstractExchange } if (queues.isEmpty()) { - _routingKey2queues.remove(queues); + _routingKey2queues.remove(routingKey); } } diff --git a/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java b/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java index 28d4b19f2e..6148fd4e1c 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java +++ b/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java @@ -1,3 +1,24 @@ +/*
+ * 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.qpid.server.exchange;
import java.util.concurrent.CopyOnWriteArraySet;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java index b88c2ebf3a..782a89c704 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java +++ b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java @@ -1,3 +1,24 @@ +/*
+ * 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.qpid.server.handler;
import org.apache.log4j.Logger;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java index 0c00436470..3e1937bb43 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java +++ b/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java @@ -1,3 +1,24 @@ +/*
+ * 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.qpid.server.handler;
import org.apache.qpid.AMQException;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java index 3b5db7d6c7..7d42297699 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java @@ -1,3 +1,24 @@ +/* + * 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.qpid.server.management; import java.lang.annotation.ElementType; @@ -9,8 +30,6 @@ import java.lang.annotation.Target; /** * Annotation for MBean attributes. This should be used with getter or setter * methods of attributes. - * @author Bhupendra Bhardwaj - * @version 0.1 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java index 7a600005e2..9138e03085 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java @@ -1,3 +1,24 @@ +/* + * 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.qpid.server.management; import java.lang.annotation.ElementType; @@ -8,8 +29,6 @@ import java.lang.annotation.Target; /** * Annotation for MBean constructors. - * @author Bhupendra Bhardwaj - * @version 0.1 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.CONSTRUCTOR) diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java index 97717662dd..448fed3280 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java @@ -1,3 +1,24 @@ +/* + * 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.qpid.server.management; import java.lang.annotation.ElementType; @@ -8,8 +29,6 @@ import java.lang.annotation.Target; /** * Annotation for MBean class. - * @author Bhupendra Bhardwaj - * @version 0.1 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java index f94be2f42f..a2dca3e51d 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java @@ -1,3 +1,24 @@ +/* + * 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.qpid.server.management; import java.lang.annotation.ElementType; @@ -10,8 +31,6 @@ import javax.management.MBeanOperationInfo; /** * Annotation for MBean operations. - * @author Bhupendra Bhardwaj - * @version 0.1 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java index ad03b740ab..aba5ec70d8 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java +++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java @@ -1,3 +1,24 @@ +/* + * 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.qpid.server.management; import java.lang.annotation.ElementType; @@ -7,8 +28,6 @@ import java.lang.annotation.Target; /** * Annotation for MBean operation parameters. - * @author Bhupendra Bhardwaj - * @version 0.1 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java b/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java index 155afa961e..2dc7fcbc1e 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java @@ -414,7 +414,7 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana rights.renameTo(old); FileOutputStream output = new FileOutputStream(tmp); - _accessRights.store(output, "Last edited by user:" + getCurrentJMXUser()); + _accessRights.store(output, "Generated by AMQUserManagementMBean Console : Last edited by user:" + getCurrentJMXUser()); output.close(); // Rename new file to main file diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java index c49f4e2a33..b29ea66bfc 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java @@ -29,18 +29,17 @@ import org.apache.qpid.server.security.auth.sasl.plain.PlainInitialiser; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.login.AccountNotFoundException; +import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.BufferedReader; import java.io.FileReader; -import java.io.UnsupportedEncodingException; -import java.util.regex.Pattern; -import java.util.Map; +import java.io.IOException; +import java.security.Principal; import java.util.HashMap; -import java.util.List; import java.util.LinkedList; -import java.security.Principal; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; /** * Represents a user database where the account information is stored in a simple flat file. @@ -212,7 +211,7 @@ public class PlainPasswordFilePrincipalDatabase implements PrincipalDatabase reader = new BufferedReader(new FileReader(_passwordFile)); String line; - while ((line = reader.readLine()) != null) + while ((line = reader.readLine()) != null && !line.startsWith("#")) { String[] result = _regexp.split(line); if (result == null || result.length < 2) diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java index 598f8f8b4c..f4f3385c75 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java +++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java @@ -20,17 +20,17 @@ */ package org.apache.qpid.server.security.auth.database; +import org.apache.log4j.Logger; import org.apache.qpid.server.security.access.AccessManager; import org.apache.qpid.server.security.access.AccessResult; -import org.apache.qpid.server.security.access.Accessable; import org.apache.qpid.server.security.access.AccessRights; +import org.apache.qpid.server.security.access.Accessable; import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal; import org.apache.qpid.server.virtualhost.VirtualHost; -import org.apache.log4j.Logger; -import java.io.IOException; import java.io.BufferedReader; import java.io.FileReader; +import java.io.IOException; import java.security.Principal; /** @@ -61,7 +61,7 @@ public class PlainPasswordVhostFilePrincipalDatabase extends PlainPasswordFilePr reader = new BufferedReader(new FileReader(_passwordFile)); String line; - while ((line = reader.readLine()) != null) + while ((line = reader.readLine()) != null && !line.startsWith("#")) { String[] result = _regexp.split(line); if (result == null || result.length < 3) |
