Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/jpos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 1.8, 9, 10, 11, 12, 13, 14, 15 ]
java: [ 1.8, 9, 10, 11, 12, 13, 14, 15, 16 ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ subprojects {
'https://oss.sonatype.org/content/repositories/snapshots/' :
'https://oss.sonatype.org/service/local/staging/deploy/maven2';

configurations.compile.transitive = true
configurations.implementation.transitive = true
javadoc.failOnError = false
pmd.ignoreFailures = true

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions jpos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.2.0'
classpath 'org.owasp:dependency-check-gradle:6.1.1'
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.3.0'
classpath 'org.owasp:dependency-check-gradle:6.1.5'
}
}
apply plugin: 'biz.aQute.bnd.builder'
Expand Down Expand Up @@ -295,7 +295,7 @@ task installApp(type: Sync) {

task viewTests (description: 'Open Test Reports') {
doLast {
Class.forName("java.awt.Desktop").newInstance().browse(
Class.forName("java.awt.Desktop").getDeclaredConstructor().newInstance().browse(
new File("${buildDir}/reports/tests/test", 'index.html').toURI())
}
}
Expand Down
2 changes: 1 addition & 1 deletion jpos/src/main/java/org/jpos/iso/Currency.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public String formatAmountForISOMsg(double amount)

public double parseAmountFromISOMsg(String isoamount)
{
return new Double(isoamount)/Math.pow(10, getDecimals());
return Double.valueOf(isoamount)/Math.pow(10, getDecimals());
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions jpos/src/main/java/org/jpos/iso/packager/GenericPackager.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public void startElement(String namespaceURI, String localName, String qName, At
*/
String packager = atts.getValue("packager");

fieldStack.push(new Integer(id));
fieldStack.push(Integer.valueOf(id));

ISOFieldPackager f;
f = (ISOFieldPackager) Class.forName(type).newInstance();
Expand Down Expand Up @@ -467,7 +467,7 @@ else if (localName.equals("isofield"))
// Insert this new isofield into the Map
// on the top of the stack using the fieldID as the key
Map m = (Map) fieldStack.peek();
m.put(new Integer(id), f);
m.put(Integer.valueOf(id), f);
}
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void startElement( String namespaceURI, String localName, String qName, A
// Insert this new isofield into the Map
// on the top of the stack using the fieldID as the key
Map m = (Map) fieldStack.peek();
m.put(new Integer(fldID), f);
m.put(Integer.valueOf(fldID), f);
}
if ( localName.equals( "isofieldvalidator" ) ){
String type = atts.getValue( "class" );
Expand Down Expand Up @@ -278,7 +278,7 @@ public void startElement( String namespaceURI, String localName, String qName, A
4) a Map to collect the subfields
*/
String packager = atts.getValue("packager");
fieldStack.push(new Integer(id));
fieldStack.push(Integer.valueOf(id));
ISOFieldPackager f;
f = (ISOFieldPackager) Class.forName(type).newInstance();
f.setDescription(name);
Expand Down Expand Up @@ -349,7 +349,7 @@ public void endElement(String namespaceURI, String localName, String qName) {
ex.printStackTrace( );
}
}
((Map)validatorStack.peek()).put( new Integer(fldID), f );
((Map)validatorStack.peek()).put(Integer.valueOf(fldID), f );
}
if ( localName.equals( "isovalidator" ) ){
/** pop properties **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,11 @@ private void init (String jceProviderClassName, String lmkFile, boolean lmkRebui
evt.addMessage("No JCE Provider specified. Attempting to load default provider (SunJCE).");
jceProviderClassName = "com.sun.crypto.provider.SunJCE";
}
provider = (Provider)Class.forName(jceProviderClassName).newInstance();
if (jceProviderClassName.equals("com.sun.crypto.provider.SunJCE")) {
provider = java.security.Security.getProvider("SunJCE");
} else {
provider = (Provider)Class.forName(jceProviderClassName).getDeclaredConstructor().newInstance();
}
Security.addProvider(provider);
evt.addMessage("name", provider.getName());
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public byte[] pack(ISOComponent m) throws ISOException {
try (ByteArrayOutputStream bout = new ByteArrayOutputStream(100)) {
ISOComponent c;
Map fields = m.getChildren();
fields.remove(new Integer(-1));
fields.remove(-1);
int len = 0;
boolean tagsStarted = false;
Iterator iterator = fields.values().iterator();
Expand Down