Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static Class<?> holderClass(String type) {
* @return true if the word is a keyword.
* @see org.apache.cxf.helpers.JavaUtils
*/
protected static boolean isJavaKeyword(String word) {
private static boolean isJavaKeyword(String word) {
return JavaUtils.isJavaKeyword(word);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public String run() {
}


@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public static void doHacks() {
if (skipHack("org.apache.cxf.JDKBugHacks.all")) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ public static Logger getL7dLogger(Class<?> cls,
/**
* Create a logger
*/
@SuppressWarnings("PMD.UselessPureMethodCall")
protected static Logger createLogger(Class<?> cls,
@SuppressWarnings("PMD.UnusedReturnValue")
private static Logger createLogger(Class<?> cls,
String name,
String loggerName) {
ClassLoader orig = getContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static KeyManager[] loadKeyStore(KeyManagerFactory kmf,
return keystoreManagers;
}

protected static byte[] loadFile(String fileName) throws IOException {
private static byte[] loadFile(String fileName) throws IOException {
if (fileName == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static XMLStreamReader createTransformReaderIfNeeded(XMLStreamReader read
return reader;
}

protected static void convertToQNamesMap(Map<String, String> map,
static void convertToQNamesMap(Map<String, String> map,
QNamesMap elementsMap,
Map<String, String> nsMap) {
if (map != null) {
Expand Down Expand Up @@ -163,7 +163,7 @@ static void convertToMapOfElementProperties(Map<String, String> map,
}
}

protected static void convertToSetOfQNames(List<String> set,
static void convertToSetOfQNames(List<String> set,
Set<QName> elementsSet) {
if (set != null) {
for (String entry : set) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
* version of WS-Adressing (for example WS-RM depends on the
* 2004/08 version).
*/
@SuppressWarnings("PMD.InstantiableUtilityClass")
public class VersionTransformer {

protected static final String NATIVE_VERSION = Names.WSA_NAMESPACE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ public void testDeserializerWithCachedFile() throws Exception {


@Test
@SuppressWarnings("PMD.UnusedReturnValue")
public void testSmallStream() throws Exception {
byte[] messageBytes = ("------=_Part_1\n\nJJJJ\n------=_Part_1\n\n"
+ "Content-Transfer-Encoding: binary\n\n=3D=3D=3D\n------=_Part_1\n").getBytes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class URIResolverTest {
private Throwable checkingThreadThrowable; // assumes single-thread test execution

@Test
@SuppressWarnings("PMD.UnusedReturnValue")
public void testJARProtocol() throws Exception {
uriResolver = new URIResolver();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;


@SuppressWarnings("PMD.UnusedReturnValue")
public class PlugInClassLoaderTest {
private static final Logger LOG = LogUtils.getLogger(PlugInClassLoaderTest.class);
private static boolean debug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

@Configuration
@ConditionalOnClass({ Resource.class, WebServiceContext.class })
@SuppressWarnings("PMD.InstantiableUtilityClass")
public class CxfJaxwsAutoConfiguration {
@Bean
static BeanFactoryPostProcessor jaxwsBeanFactoryPostProcessor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class SpringBasedTimedAnnotationProviderTest {
private MethodDispatcher methodDispatcher;

@Before
@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public void setUp() {
openMocks(this);
underTest = new SpringBasedTimedAnnotationProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private static String[] readOptionsFromFile(File dir, String wsdlName) throws Mo
}
}

protected static WsdlOption generateWsdlOptionFromFile(final File wsdl,
private static WsdlOption generateWsdlOptionFromFile(final File wsdl,
File defaultOutputDir)
throws MojoExecutionException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private static List<File> getWadlFiles(File dir, String[] includes, String[] exc
}


protected static WadlOption generateWadlOptionFromFile(final File wadl,
private static WadlOption generateWadlOptionFromFile(final File wadl,
final Option defaultOptions,
File defaultOutputDir)
throws MojoExecutionException {
Expand Down
4 changes: 2 additions & 2 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.26.0</version>
<version>7.27.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.26.0</version>
<version>7.27.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public List<Attribute> getAttributes() {
return refAttrs;
}

protected EprMetaData getObjectReferenceBinding(Definition wsdlDef, QName bindingName) {
private EprMetaData getObjectReferenceBinding(Definition wsdlDef, QName bindingName) {
EprMetaData info = new EprMetaData();
Binding wsdlBinding = wsdlDef.getBinding(bindingName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class JAXBContextInitializer extends ServiceModelVisitor {
}

@Override
@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public void begin(MessagePartInfo part) {
Class<?> clazz = part.getTypeClass();
if (clazz == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void testResursiveType() throws Exception {
assertEquals(2, classes.size());
}

public abstract static class Type2 extends AddressEntity<Type2> { //NOPMD
public abstract static class Type2 extends AddressEntity<Type2> {
}

public abstract static class AddressEntity<T extends AddressEntity<T>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public static String format(LogEvent event) {
}
return b.toString();
}
protected static String localPart(QName name) {
private static String localPart(QName name) {
return name == null ? null : name.getLocalPart();
}

protected static void write(StringBuilder b, String key, String value) {
private static void write(StringBuilder b, String key, String value) {
if (value != null) {
b.append(" ").append(key).append(": ").append(value).append('\n');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.MockitoAnnotations.openMocks;

@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public class DefaultExceptionClassProviderTest {

private static final Exception EXCEPTION_CAUSE = new CauseException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.MockitoAnnotations.openMocks;

@SuppressWarnings({"unused", "PMD.UselessPureMethodCall"})
@SuppressWarnings({"unused", "PMD.UnusedReturnValue"})
public class DefaultTimedAnnotationProviderTest {

private DefaultTimedAnnotationProvider underTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import static org.mockito.MockitoAnnotations.openMocks;


@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public class StandardTagsTest {

private static final String DUMMY_METHOD_NAME = "dummyMethod";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.MockitoAnnotations.openMocks;

@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public class JaxwsFaultCodeProviderTest {

private static final String RUNTIME_FAULT_STRING = "RUNTIME_FAULT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,11 @@ private void reportMessageHandlerProblem(String name, Class<?> cls, MediaType ct
throw new ResponseProcessingException(this, errorMessage, cause);
}

protected void autoClose(Class<?> cls, boolean exception) {
void autoClose(Class<?> cls, boolean exception) {
autoCloseWithHint(cls, false, exception);
}

protected void autoCloseWithHint(Class<?> cls, boolean autoCloseHint, boolean exception) {
void autoCloseWithHint(Class<?> cls, boolean autoCloseHint, boolean exception) {
if (!entityBufferred && !JAXRSUtils.isStreamingOutType(cls)
&& (exception || MessageUtils.getContextualBoolean(outMessage,
RESPONSE_STREAM_AUTO_CLOSE, autoCloseHint))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ protected void setProviders(boolean custom, boolean busGlobal, Object... provide
containerResponseFilters.values());
}

protected void injectApplicationIntoFeature(Feature feature) {
private void injectApplicationIntoFeature(Feature feature) {
if (application != null) {
AbstractResourceInfo info = new AbstractResourceInfo(feature.getClass(),
ClassHelper.getRealClass(feature),
Expand Down Expand Up @@ -451,7 +451,7 @@ private FeatureContext createServerFeatureContext() {
return featureContext;
}

protected static boolean isPrematching(Class<?> filterCls) {
private static boolean isPrematching(Class<?> filterCls) {
return AnnotationUtils.getClassAnnotation(filterCls, PreMatching.class) != null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public void testProviderGetPort() throws Exception {
}

final class MyEndpointReference extends EndpointReference {
protected MyEndpointReference() {
MyEndpointReference() {
}

public void writeTo(Result result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void testWrapperClassLoaderWithWrappedOperationsAndLegacyConvention() thr
loadedClassNames);
}

@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
private List<String> testWrapperClassLoaderWithNamingConvention(WrapperClassNamingConvention convention)
throws Exception {
bus.setExtension(convention, WrapperClassNamingConvention.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ protected Response handleResponse(Message outMessage, Class<?> responseClass, Ty
}
}


@SuppressWarnings("PMD.ProtectedMemberInFinalClass")
private final class BodyWriter extends AbstractBodyWriter {

protected void doWriteBody(Message outMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ protected void initializeProvider(InterceptorProvider provider, Bus bus) {
provider.getOutInterceptors().add(testInterceptor);
}

protected boolean isInitialized() {
private boolean isInitialized() {
return testInterceptor.isInitialized();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.apache.cxf.jaxrs.provider.ServerProviderFactory;

public final class DefaultApplicationFactory {
protected static class DefaultApplication extends Application {
static class DefaultApplication extends Application {
private final Set<Class<?>> serviceClasses;

DefaultApplication(final Set<Class<?>> serviceClasses) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* More specific configuration tags for WS-SecurityPolicy are configured in the SecurityConstants
* class in the cxf-rt-ws-security module, which extends this class.
*/
@SuppressWarnings("PMD.InstantiableUtilityClass")
public class SecurityConstants {

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* Some common security constants that can be used RS-Security (for now they are used in the
* JOSE + HTTP Signature modules).
*/
@SuppressWarnings("PMD.InstantiableUtilityClass")
public class RSSecurityConstants {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ private void verifyConduit(HTTPConduit conduit) {


public static final class ManagersFactory {
private ManagersFactory() {
}

public static KeyManager[] getKeyManagers() {
KeyManagersType kmt = new KeyManagersType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void run() {
}
}

protected void safeRollBack(Session session) {
void safeRollBack(Session session) {
try {
if (session != null && session.getTransacted()) {
session.rollback();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ protected static Message createMessage(String correlationId) {
return outMessage;
}

@SuppressWarnings("PMD.UnusedReturnValue")
protected static void verifyReceivedMessage(Message message) {
String response = "<not found>";
InputStream bis = message.getContent(InputStream.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void close() throws IOException {
protected void onFirstWrite() throws IOException {
dispatchToService(false);
}
protected void dispatchToService(boolean empty) throws IOException {

void dispatchToService(boolean empty) throws IOException {
final MessageImpl inMsg = new MessageImpl();
transportFactory.copy(message, inMsg);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected void onFirstWrite() throws IOException {
dispatchToClient(false);
}

protected void dispatchToClient(boolean empty) throws IOException {
void dispatchToClient(boolean empty) throws IOException {
final MessageImpl m = new MessageImpl();
localDestinationFactory.copy(message, m);
if (!empty) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* WS-ReliableMessaging 1.0 encoding and decoding. This converts between the standard WS-RM objects and the
* 1.0 representation using the WS-Addressing recommendation 200508 namespace.
*/
@SuppressWarnings("PMD.ProtectedMemberInFinalClass")
public final class EncoderDecoder10AImpl extends EncoderDecoder {

public static final EncoderDecoder10AImpl INSTANCE = new EncoderDecoder10AImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* WS-ReliableMessaging 1.0 encoding and decoding. This converts between the standard WS-RM objects and the
* 1.0 representation using the WS-Addressing 200408 namespace specified in the WS-RM 1.0 recommendation.
*/
@SuppressWarnings("PMD.ProtectedMemberInFinalClass")
public final class EncoderDecoder10Impl extends EncoderDecoder {

public static final EncoderDecoder10Impl INSTANCE = new EncoderDecoder10Impl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* WS-ReliableMessaging 1.1/1.2 encoding and decoding. This just works with the standard internal form of the
* WS-RM data structures.
*/
@SuppressWarnings("PMD.ProtectedMemberInFinalClass")
public final class EncoderDecoder11Impl extends EncoderDecoder {

public static final EncoderDecoder11Impl INSTANCE = new EncoderDecoder11Impl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Holder for utility methods relating to contexts.
*/

@SuppressWarnings({ "PMD.InstantiableUtilityClass", "PMD.ProtectedMemberInFinalClass" })
public final class RMContextUtils {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/**
*
*/
@SuppressWarnings("PMD.UselessPureMethodCall")
@SuppressWarnings("PMD.UnusedReturnValue")
public class AbstractRMInterceptorTest {
@Test
public void testAccessors() {
Expand Down
Loading
Loading