Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Feb 20, 2024
1 parent 47e553d commit fd63460
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/jws/HandlerChain.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
* @deprecated As of JSR-181 2.0 with no replacement.
*/
@Deprecated String name() default "";
};
}
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/jws/WebMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
* @since 2.0
*/
boolean exclude() default false;
};
}
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/jws/WebParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum Mode {
IN,
OUT,
INOUT
};
}

/**
* Name of the parameter.
Expand Down Expand Up @@ -99,4 +99,4 @@ enum Mode {
* rather than the message body or {@code false} otherwise
*/
boolean header() default false;
};
}
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/jws/WebService.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@
* @return the complete name of the service endpoint interface
*/
String endpointInterface() default "";
};
}
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/jws/soap/InitParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -25,5 +25,5 @@
* @return the value of the initialization parameter
*/
String value();
};
}

6 changes: 3 additions & 3 deletions api/src/main/java/jakarta/jws/soap/SOAPBinding.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -30,15 +30,15 @@
enum Style {
DOCUMENT,
RPC
};
}

/**
* The SOAP binding use
*/
enum Use {
LITERAL,
ENCODED
};
}

/**
* The style of mapping parameters onto SOAP messages
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/jws/soap/SOAPMessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
* @return the list of SOAP headers processed by the handler
*/
String[] headers() default {};
};
}


4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/jws/soap/SOAPMessageHandlers.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -31,4 +31,4 @@
@Deprecated public @interface SOAPMessageHandlers {

SOAPMessageHandler[] value();
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ enum Scope {
/**
* Handler visibility.
*/
HANDLER};
HANDLER}

/**
* Sets the scope of a property.
Expand Down
12 changes: 3 additions & 9 deletions api/src/main/java/jakarta/xml/ws/spi/FactoryFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@

package jakarta.xml.ws.spi;

import java.io.*;

import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Properties;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand All @@ -29,7 +23,7 @@ class FactoryFinder {
private static final Logger LOGGER;

private static final ServiceLoaderUtil.ExceptionHandler<WebServiceException> EXCEPTION_HANDLER =
new ServiceLoaderUtil.ExceptionHandler<WebServiceException>() {
new ServiceLoaderUtil.ExceptionHandler<>() {
@Override
public WebServiceException createException(Throwable throwable, String message) {
return new WebServiceException(message, throwable);
Expand Down Expand Up @@ -107,7 +101,7 @@ static <T> T find(Class<T> factoryClass, String fallbackClassName) {
"Provider for " + factoryId + " cannot be found", null);
}

return (T) ServiceLoaderUtil.newInstance(fallbackClassName,
return ServiceLoaderUtil.newInstance(fallbackClassName,
fallbackClassName, classLoader, EXCEPTION_HANDLER);
}

Expand Down Expand Up @@ -166,7 +160,7 @@ private static <T> T lookupUsingOSGiServiceLoader(String factoryId) {

private static <T> T newInstance(String className, String defaultImplClassName, ClassLoader classLoader){
@SuppressWarnings({"unchecked"})
T newInstance = (T) ServiceLoaderUtil.newInstance(className,
T newInstance = ServiceLoaderUtil.newInstance(className,
defaultImplClassName, classLoader, EXCEPTION_HANDLER);
if (LOGGER.isLoggable(Level.FINE)) {
// extra check to avoid costly which operation if not logged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public final class W3CEndpointReferenceBuilder {
* Creates a new {@code W3CEndpointReferenceBuilder} instance.
*/
public W3CEndpointReferenceBuilder() {
referenceParameters = new ArrayList<Element>();
metadata = new ArrayList<Element>();
attributes = new HashMap<QName, String>();
elements = new ArrayList<Element>();
referenceParameters = new ArrayList<>();
metadata = new ArrayList<>();
attributes = new HashMap<>();
elements = new ArrayList<>();
}

/**
Expand Down

0 comments on commit fd63460

Please sign in to comment.