Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
0db6799d
Commit
0db6799d
authored
Jul 30, 2013
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish spring-boot-loader-tools
Issue: #53129653
parent
826f4274
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
JarWriter.java
...java/org/springframework/boot/loader/tools/JarWriter.java
+6
-3
Repackager.java
...ava/org/springframework/boot/loader/tools/Repackager.java
+1
-1
No files found.
spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java
View file @
0db6799d
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
loader
.
tools
;
package
org
.
springframework
.
boot
.
loader
.
tools
;
import
java.io.BufferedInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
...
@@ -25,6 +26,7 @@ import java.io.FilterInputStream;
...
@@ -25,6 +26,7 @@ import java.io.FilterInputStream;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.net.URL
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -45,7 +47,7 @@ import java.util.zip.ZipEntry;
...
@@ -45,7 +47,7 @@ import java.util.zip.ZipEntry;
*/
*/
class
JarWriter
{
class
JarWriter
{
private
static
final
String
NESTED_LOADER_JAR
=
"
/
META-INF/loader/spring-boot-loader.jar"
;
private
static
final
String
NESTED_LOADER_JAR
=
"META-INF/loader/spring-boot-loader.jar"
;
private
static
final
int
BUFFER_SIZE
=
4096
;
private
static
final
int
BUFFER_SIZE
=
4096
;
...
@@ -122,8 +124,9 @@ class JarWriter {
...
@@ -122,8 +124,9 @@ class JarWriter {
* @throws IOException
* @throws IOException
*/
*/
public
void
writeLoaderClasses
()
throws
IOException
{
public
void
writeLoaderClasses
()
throws
IOException
{
JarInputStream
inputStream
=
new
JarInputStream
(
getClass
().
getResourceAsStream
(
URL
loaderJar
=
getClass
().
getClassLoader
().
getResource
(
NESTED_LOADER_JAR
);
NESTED_LOADER_JAR
));
JarInputStream
inputStream
=
new
JarInputStream
(
new
BufferedInputStream
(
loaderJar
.
openStream
()));
JarEntry
entry
;
JarEntry
entry
;
while
((
entry
=
inputStream
.
getNextJarEntry
())
!=
null
)
{
while
((
entry
=
inputStream
.
getNextJarEntry
())
!=
null
)
{
if
(
entry
.
getName
().
endsWith
(
".class"
))
{
if
(
entry
.
getName
().
endsWith
(
".class"
))
{
...
...
spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java
View file @
0db6799d
...
@@ -51,7 +51,7 @@ public class Repackager {
...
@@ -51,7 +51,7 @@ public class Repackager {
/**
/**
* Sets the main class that should be run. If not specified the value from the
* Sets the main class that should be run. If not specified the value from the
* MANIFEST will be used, or if no manifest entry is found
a class
the archive will be
* MANIFEST will be used, or if no manifest entry is found the archive will be
* searched for a suitable class.
* searched for a suitable class.
* @param mainClass the main class name
* @param mainClass the main class name
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment