Skip to content

Commit

Permalink
minor reformat - relates to github #1771
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Sep 2, 2024
1 parent 8c59d96 commit dee3de9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
public class PemReader
extends BufferedReader
{
public static final String LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME = "org.bouncycastle.pemreader.lax";

private static final String BEGIN = "-----BEGIN ";
private static final String END = "-----END ";
public static final String LAX_PARSING_SYSTEM_PROPERTY_NAME = "org.bouncycastle.pemreader.lax";
private static final Logger LOG = Logger.getLogger(PemReader.class.getName());

public PemReader(Reader reader)
Expand Down Expand Up @@ -79,7 +80,7 @@ private PemObject loadObject(String type)
continue;
}

if (System.getProperty(LAX_PARSING_SYSTEM_PROPERTY_NAME, "false").equalsIgnoreCase("true"))
if (System.getProperty(LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME, "false").equalsIgnoreCase("true"))
{
String trimmedLine = line.trim();
if (!trimmedLine.equals(line) && LOG.isLoggable(Level.WARNING))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.bouncycastle.util.io.pem.PemReader;
import org.bouncycastle.util.io.pem.PemWriter;

import static org.bouncycastle.util.io.pem.PemReader.LAX_PARSING_SYSTEM_PROPERTY_NAME;
import static org.bouncycastle.util.io.pem.PemReader.LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME;

public class AllTests
extends TestCase
Expand Down Expand Up @@ -127,7 +127,7 @@ public void testRegularBlobEndFault()
public void testRegularBlobEndLaxParsing()
throws IOException
{
String original = System.setProperty(LAX_PARSING_SYSTEM_PROPERTY_NAME, "true");
String original = System.setProperty(LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME, "true");
PemReader rd = new PemReader(new StringReader(blob4));

PemObject obj;
Expand All @@ -139,11 +139,11 @@ public void testRegularBlobEndLaxParsing()
{
if (original != null)
{
System.setProperty(LAX_PARSING_SYSTEM_PROPERTY_NAME, original);
System.setProperty(LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME, original);
}
else
{
System.clearProperty(LAX_PARSING_SYSTEM_PROPERTY_NAME);
System.clearProperty(LAX_PEM_PARSING_SYSTEM_PROPERTY_NAME);
}
}

Expand Down

0 comments on commit dee3de9

Please sign in to comment.