Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,15 @@
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
</dependencies>
</project>
3 changes: 2 additions & 1 deletion src/main/java/com/j2bugzilla/api/Bugzilla.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.net.URI;
import java.util.ServiceLoader;
import java.util.Set;
import com.j2bugzilla.api.ConnectionException;

/**
* The {@code Bugzilla} class is the entry point into the API. This class adheres to the SPI contract.
Expand All @@ -11,7 +12,7 @@
*
* @author Tom
*/
public abstract class Bugzilla {
public abstract class Bugzilla{

/**
* Loads and returns a new instance of {@link Bugzilla} to provide access to the various
Expand Down
45 changes: 45 additions & 0 deletions src/main/java/com/j2bugzilla/api/ConnectionException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright 2011 Thomas Golden
*
* Licensed 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 com.j2bugzilla.api;

/**
* <code>ConnectionException</code> is thrown any time there is an error trying to access
* the Bugzilla installation over the network. It may be a network-related problem such as
* a timeout or malformed URL, or it may be an underlying XML-RPC exception, but it
* generally indicates that any further Bugzilla calls will fail.
*
* ConnectionException will always be a wrapper for a nested <code>Exception</code> which
* indicates the cause of the error.
* @author Tom
*
*/
public class ConnectionException extends RuntimeException {

/**
* Eclipse-generated SUID
*/
private static final long serialVersionUID = 2957676868743832929L;

/**
* Public constructor which calls super()
* @param message A custom error message describing the issue
* @param cause The root cause of the exception
*/
public ConnectionException(String message, Throwable cause) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably override the 4 most common exception constructors.

super(message, cause);
}

}
5 changes: 2 additions & 3 deletions src/main/java/com/j2bugzilla/api/SearchBy.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public enum SearchBy {

private final String name;
/**
* Creates a new {@link SearchLimiter} with the
* Creates a new {@link SearchBy} with the
* designated name
* @param name The name Bugzilla expects for this search limiter
*/
Expand All @@ -92,8 +92,7 @@ public enum SearchBy {
* Get the name Bugzilla expects for this search limiter
* @return A <code>String</code> representing the search limiter
*/
String getName() {
public String getName() {
return this.name;
}

}