[java-idp-plugin-metadatagen] branch main updated: JMETAGEN-1 NullPointerException when piping output of metadatagen to somewhere else
Rod Widdowson
rdw at steadingsoftware.com
Thu Mar 10 20:42:35 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-idp-plugin-metadatagen.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-metadatagen.git;a=commit;h=7477edd1503fa169570b07fcee70495a5264482a
The following commit(s) were added to refs/heads/main by this push:
new 7477edd JMETAGEN-1 NullPointerException when piping output of metadatagen to somewhere else
7477edd is described below
commit 7477edd1503fa169570b07fcee70495a5264482a
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Mar 10 20:41:37 2022 +0000
JMETAGEN-1 NullPointerException when piping output of metadatagen to somewhere else
https://shibboleth.atlassian.net/browse/JMETAGEN-1
---
.../idp/plugin/metadatagen/impl/MetadataGenCLI.java | 2 +-
.../idp/plugin/metadatagen/impl/MetadataGenTest.java | 11 ++++-------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenCLI.java b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenCLI.java
index b3039e7..2446bda 100644
--- a/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenCLI.java
+++ b/metadatagen-impl/src/main/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenCLI.java
@@ -501,7 +501,7 @@ public final class MetadataGenCLI extends AbstractIdPHomeAwareCommandLine<Metada
*/
private boolean setupWriter() {
if (args.getOutput() == null) {
- output = System.console().writer();
+ output = new PrintWriter(System.out);
} else {
final File out = new File(args.getOutput());
try {
diff --git a/metadatagen-impl/src/test/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTest.java b/metadatagen-impl/src/test/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTest.java
index deecfb0..ed0b35a 100644
--- a/metadatagen-impl/src/test/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTest.java
+++ b/metadatagen-impl/src/test/java/net/shibboleth/idp/plugin/metadatagen/impl/MetadataGenTest.java
@@ -41,9 +41,7 @@ public class MetadataGenTest {
// Set the next three up to run the test
private final static String IDP_HOME = "H:/Downloads/idp";
- private final static String OUTPUT_DIR = "C:/Users/rdw/Desktop/logs";
-
- private final boolean enabled = false;
+ private final boolean enabled = true;
@Test(enabled = enabled) public void test() throws IOException {
assertEquals(MetadataGenCLI.runMain(
@@ -54,7 +52,7 @@ public class MetadataGenTest {
"+saml1",
"--backChannel", IDP_HOME + "/credentials/idp-backchannel.crt",
"+attributeFetch","+artifact", "+logout",
- "--output", OUTPUT_DIR + "/Mdbc.txt"}),
+ }),
AbstractCommandLine.RC_OK);
}
@@ -80,7 +78,7 @@ public class MetadataGenTest {
"+saml1",
"--propertyFiles", file1.getPath() +","+ file2.getPath(),
"+attributeFetch","+artifact", "+logout",
- "--output", OUTPUT_DIR + "/MdbcProps.txt"}),
+ }),
AbstractCommandLine.RC_OK);
}
@@ -90,8 +88,7 @@ public class MetadataGenTest {
new String[] {
"--home", IDP_HOME,
"--verbose", "+logout",
- "+saml1",
- "--output", OUTPUT_DIR + "/Md.txt"}),
+ "+saml1"}),
AbstractCommandLine.RC_OK);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list