-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of inner classes and some related shenanigans
- Loading branch information
1 parent
74d8248
commit 9a9b513
Showing
14 changed files
with
970 additions
and
914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd"> | ||
</FindBugsFilter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
task/src/main/java/pro/javacard/ant/HelpingBuildException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package pro.javacard.ant; | ||
|
||
import org.apache.tools.ant.BuildException; | ||
|
||
public class HelpingBuildException extends BuildException { | ||
private final static long serialVersionUID = -2365126253968479314L; | ||
|
||
public HelpingBuildException(String msg) { | ||
super(msg + "\n\nPLEASE READ https://github.com/martinpaljak/ant-javacard#readme"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package pro.javacard.ant; | ||
|
||
import org.apache.tools.ant.BuildException; | ||
|
||
// Just for Ant | ||
public class JCApplet { | ||
String klass = null; | ||
byte[] aid = null; | ||
|
||
public JCApplet() { | ||
} | ||
|
||
public void setClass(String msg) { | ||
klass = msg; | ||
} | ||
|
||
public void setAID(String msg) { | ||
try { | ||
aid = Misc.stringToBin(msg); | ||
if (aid.length < 5 || aid.length > 16) { | ||
throw new BuildException("Applet AID must be between 5 and 16 bytes: " + aid.length); | ||
} | ||
} catch (IllegalArgumentException e) { | ||
throw new BuildException("Not a valid applet AID: " + e.getMessage()); | ||
} | ||
} | ||
} |
Oops, something went wrong.