Skip to content

Commit

Permalink
Fixxes #4283 - Cleanup various bits
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Nov 26, 2024
1 parent 4f31989 commit 64169dc
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@

exports cloud.piranha.extension.servletannotations;
opens cloud.piranha.extension.servletannotations;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
requires jakarta.annotation;
}
2 changes: 1 addition & 1 deletion extension/soteria/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

exports cloud.piranha.extension.soteria;
opens cloud.piranha.extension.soteria;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
requires cloud.piranha.core.impl;
requires jakarta.cdi;
requires jakarta.inject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
@ApplicationScoped
public class TestIdentityStore implements IdentityStore {

@SuppressWarnings("exports")
public CredentialValidationResult validate(
UsernamePasswordCredential usernamePasswordCredential) {

Expand Down
2 changes: 1 addition & 1 deletion extension/tempdir/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@

exports cloud.piranha.extension.tempdir;
opens cloud.piranha.extension.tempdir;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
}
2 changes: 1 addition & 1 deletion extension/tyrus/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

exports cloud.piranha.extension.tyrus;
opens cloud.piranha.extension.tyrus;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
requires org.glassfish.tyrus.container.servlet;
requires static cloud.piranha.extension.scinitializer;
}
2 changes: 1 addition & 1 deletion extension/wasp/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

exports cloud.piranha.extension.wasp;
opens cloud.piranha.extension.wasp;
requires cloud.piranha.core.impl;
requires transitive cloud.piranha.core.impl;
requires jakarta.servlet.jsp;
requires transitive org.glassfish.wasp;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import cloud.piranha.core.api.WebApplication;
import cloud.piranha.core.impl.DefaultWebApplication;
import cloud.piranha.embedded.EmbeddedPiranha;
import cloud.piranha.embedded.EmbeddedPiranhaBuilder;
import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
Expand All @@ -53,7 +52,7 @@ class JspDescriptorTest {
@Test
void testGetJspConfigDescriptor() throws Exception {
WebApplication webApplication = new DefaultWebApplication();
EmbeddedPiranha piranha = new EmbeddedPiranhaBuilder()
new EmbeddedPiranhaBuilder()
.webApplication(webApplication)
.initializer(WaspInitializer.class.getName())
.buildAndStart();
Expand Down
2 changes: 1 addition & 1 deletion extension/webprofile/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

exports cloud.piranha.extension.webprofile;
opens cloud.piranha.extension.webprofile;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
requires cloud.piranha.extension.annotationscan;
requires cloud.piranha.extension.annotationscan.classfile;
requires cloud.piranha.extension.fileupload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ private void processFilterMappings(WebApplication webApplication, WebXml webXml)
});
}

@SuppressWarnings("unchecked")
private EnumSet<DispatcherType> toEnumDispatcherTypes(List<String> dispatchers) {
if (dispatchers == null) {
return null;
}

@SuppressWarnings("rawtypes")
EnumSet enumSet = EnumSet.noneOf(DispatcherType.class);
for (String dispatcherType : dispatchers) {
enumSet.add(DispatcherType.valueOf(dispatcherType));
Expand Down
2 changes: 1 addition & 1 deletion extension/webxml/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

exports cloud.piranha.extension.webxml;
opens cloud.piranha.extension.webxml;
requires cloud.piranha.core.api;
requires transitive cloud.piranha.core.api;
requires cloud.piranha.core.impl;
requires static java.naming;
requires static java.sql;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class PiranhaDeploymentExceptionTransformer implements DeploymentExceptio

@Override
public Throwable transform(Throwable throwable) {
@SuppressWarnings("unchecked")
List<Throwable> throwableList = ExceptionUtils.getThrowableList(throwable);
if (throwableList.size() < 1)
return throwable;
Expand Down

0 comments on commit 64169dc

Please sign in to comment.