Skip to content

Commit

Permalink
fix some compile-time warnings
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 Mar 12, 2022
1 parent 7dd45b5 commit 61e61dd
Show file tree
Hide file tree
Showing 95 changed files with 234 additions and 288 deletions.
3 changes: 3 additions & 0 deletions wsit/bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

<properties>
<spotbugs.skip>true</spotbugs.skip>
<comp.xlint>-Xlint:none</comp.xlint>
<comp.xdoclint>-Xdoclint:none</comp.xdoclint>
<jdoc.doclint>none</jdoc.doclint>
</properties>

<modules>
Expand Down
3 changes: 3 additions & 0 deletions wsit/bundles/webservices-extra-xmlsec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,8 @@
<dep.sources>${project.build.directory}/generated-sources/dependencies</dep.sources>
<dep.sources.mr>${project.build.directory}/generated-sources/dependencies-mr</dep.sources.mr>
<dep.sources.jaxb>${project.build.directory}/generated-sources/dependencies-jaxb</dep.sources.jaxb>
<comp.xlint>-Xlint:none</comp.xlint>
<comp.xdoclint>-Xdoclint:none</comp.xdoclint>
<jdoc.doclint>none</jdoc.doclint>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -229,7 +229,6 @@ public static WSDLModel parseModel(final URL configFileUrl, final boolean isClie
* {@code null} is returned as a result of this method call. In case
* of any other problems that may occur while locating the WSIT config file, a
* {@link PolicyException} is thrown.
* <p>
*
* @param configFileIdentifier base of WSIT config file name (web service name for WSIT service
* config file or "client" for WSIT client configuration). Must not be {@code null}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -21,7 +21,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class MetroConfigLoaderTest extends TestCase {

Expand Down
6 changes: 3 additions & 3 deletions wsit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@
-Djava.awt.headless=true -Xmx256m
</argLine>
<!-- exclude big groups from the Xlint -->
<comp.xlint>-Xlint:all,-rawtypes,-unchecked,-serial</comp.xlint>
<comp.xlint>-Xlint:all,-rawtypes,-unchecked</comp.xlint>
<!-- -Xdoclint:-missing does not seem to work properly on the infra -->
<comp.xdoclint>-Xdoclint:none</comp.xdoclint>
<warn.limit>150</warn.limit>
<comp.xdoclint>-Xdoclint:all,-missing</comp.xdoclint>
<warn.limit>150000</warn.limit>
<jdoc.doclint>all,-missing</jdoc.doclint>
</properties>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -19,7 +19,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
@WebService
public class AudioStreamer {
Expand Down
4 changes: 2 additions & 2 deletions wsit/samples/audiostream/AudioStreamerApp/web/index.jsp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%--
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 1997, 2022 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 @@ -12,7 +12,7 @@

<%--
Document : index
Author : Marek Potociar <marek.potociar at sun.com>
Author : Marek Potociar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public interface OutboundConnectionCache<C extends Connection>
* that return connections in LRU order, with the least recently used
* connection first. This is done to aid a finder that wishes to consider
* load balancing in its determination of an appropriate connection.
* <P>
*
*/
C get( ContactInfo<C> cinfo, ConnectionFinder<C> finder
) throws IOException ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class ByteBufferInputStream extends InputStream {

/**
* The wrapped <code>ByteBuffer</code<
* The wrapped <code>ByteBuffer</code>
*/
private ByteBuffer byteBuffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -33,7 +33,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 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 @@ -33,7 +33,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
*
* @author Marek Potociar <marek.potociar at sun.com>
* @author Marek Potociar
*/
public class ClientTest extends TestCase {
private static final Logger LOGGER = Logger.getLogger(ClientTest.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import jakarta.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

Expand Down Expand Up @@ -212,7 +213,7 @@ private Metadata createMetadata(final InputStream stream)
int state = 0;
do {
state = reader.next();
} while (state != reader.START_ELEMENT ||
} while (state != XMLStreamConstants.START_ELEMENT ||
!reader.getLocalName().equals("Metadata"));

final Unmarshaller uMarhaller = jaxbContext.createUnmarshaller();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.sun.xml.ws.policy.spi.AssertionCreationException;
import com.sun.xml.ws.policy.spi.PolicyAssertionCreator;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.HashSet;
import java.util.logging.Level;
Expand Down Expand Up @@ -91,37 +90,16 @@ public PolicyAssertion createAssertion(AssertionData assertionData, Collection<P
if(cons != null){
try {
return (PolicyAssertion) cons.newInstance(assertionData, nestedAssertions, nestedAlternative);
} catch (IllegalArgumentException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}

throw new AssertionCreationException(assertionData,ex);
} catch (InvocationTargetException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}
throw new AssertionCreationException(assertionData,ex);
} catch (InstantiationException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}
throw new AssertionCreationException(assertionData,ex);
} catch (IllegalAccessException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
} catch (ReflectiveOperationException ex) {
if(LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}
throw new AssertionCreationException(assertionData,ex);
}
}else{
try{
return (PolicyAssertion)cl.newInstance();
} catch (InstantiationException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}
throw new AssertionCreationException(assertionData,ex);
} catch (IllegalAccessException ex) {
return (PolicyAssertion)cl.getConstructor().newInstance();
} catch (ReflectiveOperationException ex) {
if(LOGGER.isLoggable(Level.SEVERE)){
LOGGER.log(Level.SEVERE,LocalizationMessages.WSA_0003_ERROR_INSTANTIATING(assertionData.getName()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class DerivedKeyTokenImpl implements DerivedKeyToken {
private long length = 32; // Default length
private long offset = 0; // Default offset
private long generation = 0;
private String label = this.DEFAULT_DERIVEDKEYTOKEN_LABEL;
private String label = DerivedKeyToken.DEFAULT_DERIVEDKEYTOKEN_LABEL;
private byte[] secret, nonce;

/** Creates a new instance of DerivedKeyTokenImpl */
Expand Down Expand Up @@ -82,7 +82,7 @@ public DerivedKeyTokenImpl(long generation, byte[] secret){
@Override
public URI getAlgorithm() {
try {
return new URI(this.DEFAULT_DERIVED_KEY_TOKEN_ALGORITHM);
return new URI(DerivedKeyToken.DEFAULT_DERIVED_KEY_TOKEN_ALGORITHM);
} catch (URISyntaxException ex) {
//ignore
}
Expand All @@ -101,7 +101,7 @@ public long getOffset() {

@Override
public String getType() {
return this.DERIVED_KEY_TOKEN_TYPE;
return DerivedKeyToken.DERIVED_KEY_TOKEN_TYPE;
}

@Override
Expand Down
Loading

0 comments on commit 61e61dd

Please sign in to comment.