Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to be java9+ compatible for mac #464

Open
wants to merge 217 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
09988cb
Initial commit
May 13, 2019
e2e4ce4
Initial commit
May 15, 2019
d3bb031
Initial commit
May 15, 2019
d850ec4
Update test resources
May 15, 2019
e986b29
Fixed #240 : Double Quotes aren't escaped.
May 18, 2019
9cfcf7d
Update version to 1.0.1
May 18, 2019
4ae2ddc
Optimize ternary operator
May 18, 2019
6ecf551
Optimize ternary operator
May 19, 2019
3758e39
Limit the excessive time taken by layout
May 19, 2019
ca0e165
Fixed #197 : INTERNAL ERROR
May 20, 2019
c010755
Update tests
May 22, 2019
d5a198d
Fixed NPE when decompiling java.lang.Object
May 23, 2019
de7f67f
Improves the layout
May 25, 2019
179984e
Replace bridge methods
May 26, 2019
f831a96
Cleanup
May 26, 2019
651c0a7
Update version to 1.0.2
May 26, 2019
5f7312e
Update README.md
May 30, 2019
c6005bd
Update README.md
May 30, 2019
9943bc9
Update README.md
May 31, 2019
4e1300e
Prepare version 1.0.3
May 31, 2019
9126717
Add Java 9+ module support
Jun 1, 2019
045c7dd
Fixed #244, bug on "MethodParameters" attribute parsing
Jun 1, 2019
b55c932
Update API for Java modules
Jun 3, 2019
411784b
Update API for Java modules
Jun 3, 2019
448b176
Update version to 1.0.4
Jun 3, 2019
cdb695a
Add default, private and static methods in interface support
Jun 16, 2019
16619db
Add string concatenation in Java 9 support
Jun 16, 2019
d90d4df
Remove all reflection 'invoke' method calls
Jun 21, 2019
b3ccba8
Update version to 1.0.5
Jun 21, 2019
6019a90
Improve loop reconstruction
Jun 22, 2019
210935d
Improve local variable reconstruction
Jun 22, 2019
42fa3df
Improve 'for' statement reconstruction
Jun 29, 2019
b0557f8
Fix bug on 'switch' statement recognition
Jun 30, 2019
c77b46e
Update version to 1.0.6
Jun 30, 2019
f7c6684
Fix compilation warning
Jun 30, 2019
cefe750
Fix #249 : Bug with switch case multi-labels
Jul 1, 2019
09f5e60
Fix NPE thrown when inner and anonymous classes are missing
Jul 7, 2019
4ca89c9
Fix JD-GUI #252 : incorrect integer constant type
Jul 7, 2019
ad4d6fd
Add jd-core-x.y.y.jat to JCenter Maven repository
Jul 8, 2019
2c6de62
Update version to 1.0.7
Jul 8, 2019
225e4d6
Fix bug on Long constant references
Jul 21, 2019
10adb37
Fix bug on local variable declarations
Jul 21, 2019
bf81c7e
Fix indentation
Jul 21, 2019
7d8a365
Fix indentation
Jul 21, 2019
1dd36f9
Fix bug on method declarations
Jul 21, 2019
1882ab4
Fix bug on method declarations
Jul 21, 2019
41262a9
Fix bug on empty switch statement
Jul 24, 2019
5ae9e8a
Add type arguments on variable declaration of type 'Class'
Jul 24, 2019
87ecfad
Fix bugs on local variable declaration
Jul 29, 2019
518515c
In unit tests, check that the decompiled source code can be recompiled.
Jul 29, 2019
2cb0457
Update unit tests
Jul 29, 2019
99c75c9
Update local variable maker
Aug 4, 2019
85f35bb
Add tests
Aug 4, 2019
e5faeac
Update object type maker
Aug 11, 2019
dede475
Fix bug on the declarations of the volatile fields
Aug 15, 2019
e80f641
Improve generic variable declarations in 'for' loops
Aug 15, 2019
5cccf13
Refactoring : rename 'UnknownTypeArgument' to 'WildcardTypeArgument'
Aug 15, 2019
b9db633
Improve 'CompilerUtil'
Aug 15, 2019
cb0dad6
Refactor LoopStatementMaker
Aug 15, 2019
a97d78f
Simplification
Aug 15, 2019
1fe723a
Improve recognition of local variables
Aug 15, 2019
0b16617
Improve RemoveBinaryOpReturnStatementsVisitor
Aug 15, 2019
41771d6
Update JarFileToJavaSourceTest
Aug 15, 2019
ca1dec9
Improve the generation of generic local variables
Aug 15, 2019
068c2b9
Update comments
Aug 15, 2019
c787196
Improve the generation of generic local variables
Aug 16, 2019
ecf9843
Fix bug on parameters in method invocations
Aug 17, 2019
686185b
Fix bug in identifying numeric constant types
Aug 17, 2019
c2962e6
Improve recognition of switch-enum statements
Aug 18, 2019
73f08cf
Fix bug on parameters in 'this' and 'super' method invocations
Aug 18, 2019
a94f5b9
Remove some outer local variable references
Aug 19, 2019
f6b0837
Prepare refactoring of ObjectTypeMaker and SignatureParser
Aug 20, 2019
afd3af5
Merge ObjectTypeMaker and SignatureParser
Aug 20, 2019
aa8d673
Improve the generation of generic local variables
Aug 21, 2019
90d5e76
Update version to 1.0.9
Aug 21, 2019
57b5bb9
Fix syntax errors in decompiled sources
Sep 4, 2019
b417028
Fix corrects syntax errors in decompiled sources
Sep 8, 2019
e8035a0
Fix syntax errors in decompiled sources - score 1
Oct 9, 2019
3f94ab1
Fix syntax errors in decompiled sources - score 0
Nov 1, 2019
0491b5f
Update test
Nov 1, 2019
6d2822a
Update version to 1.1.0
Nov 1, 2019
9506382
Fix warnings
Nov 1, 2019
7fa1b8f
Quick fixes
Nov 1, 2019
83b3c1a
Fix error in operator precedence
Nov 2, 2019
2503864
Fix error in enum declaration access flags
Nov 2, 2019
7fd25cc
Minor update
Nov 2, 2019
0492ad6
Fix error on integer constant definition
Nov 2, 2019
424d9b1
Fix error in instance field initialization
Nov 3, 2019
34ea0c5
Fix error in instance field initialization
Nov 5, 2019
1a82470
Update build file
Nov 5, 2019
9da4f4b
Update README.md
Nov 5, 2019
b804323
Fix bug with try-with-resources
Nov 17, 2019
b9c0481
Fix error in instance field initializations
Nov 17, 2019
a52fe37
Update tests
Nov 17, 2019
8efb011
Update version to 1.1.2
Nov 17, 2019
f1a57ed
Works on try-catch-finally statements
Nov 20, 2019
bcf976b
Fix bug in enum constant declarations
Nov 20, 2019
0f94f87
Fix problem in bridged field instance references
Nov 21, 2019
1e34e52
Fix syntax errors in decompiled sources
Nov 23, 2019
56f4bf1
Fix error with Float.NaN and Double.NaN
Nov 23, 2019
e8462bd
Fix syntax errors in decompiled sources
Nov 27, 2019
30c89a4
Fix syntax errors in decompiled sources
Nov 27, 2019
3edb5f1
Fix syntax errors in decompiled sources
Nov 27, 2019
8ed4e58
Fix comments
Dec 5, 2019
9b3a168
Fix syntax errors in decompiled sources
Dec 8, 2019
db03b6b
Fix syntax errors in decompiled sources
Dec 9, 2019
1a79b9e
Fix syntax errors in decompiled sources
Dec 9, 2019
b6b7551
Fix syntax errors in decompiled sources
Dec 9, 2019
b8d7a06
Fix syntax errors in decompiled sources
Dec 9, 2019
e216332
Fix syntax errors in decompiled sources
Dec 16, 2019
0bc5912
Fix syntax errors in decompiled sources
Dec 16, 2019
6968f99
Fix syntax errors in decompiled sources
Dec 17, 2019
e969802
Fix syntax errors in decompiled sources
Dec 17, 2019
64a317c
Fix syntax errors in decompiled sources
Dec 17, 2019
a58e6d6
Fix syntax errors in decompiled sources
Dec 17, 2019
b199ffc
Fix syntax errors in decompiled sources
Dec 17, 2019
df30945
Fix syntax errors in decompiled sources
Dec 19, 2019
10c46fd
Fix syntax errors in decompiled sources
Dec 22, 2019
bc4a4e8
Fix error in generic type decompilation
Dec 23, 2019
66ea8c7
Fix syntax errors in decompiled sources
Dec 25, 2019
68d63d2
Update configuration parsing
Dec 25, 2019
a5c0ef6
Update layouter
Dec 25, 2019
8bc1e8f
Update tests
Dec 25, 2019
3904aba
Prepare version 1.1.3
Dec 25, 2019
51fd8e9
Publish JD-Core 1.1.3
Dec 25, 2019
16074c8
Fix syntax errors in decompiled sources
Dec 27, 2019
77a7be8
Improve import research
Dec 27, 2019
76786ee
Improve import search
Dec 27, 2019
3a10b27
Fix syntax errors in decompiled sources
Dec 27, 2019
636cf28
Improve import search
Dec 27, 2019
6092b93
Fix syntax errors in decompiled sources
Dec 27, 2019
9624479
Fix syntax errors in decompiled sources
Dec 27, 2019
e0a957d
Fix syntax errors in decompiled sources
Dec 27, 2019
7f01508
Fix bug in try-catch-finally reconstruction
Dec 28, 2019
819160b
Fix syntax errors in decompiled sources
Dec 28, 2019
3639a05
Fix display of unicode characters
Dec 30, 2019
f4b1072
Fix display of unicode characters
Dec 30, 2019
646e4c0
Improve control flows recognition
Dec 30, 2019
130df93
Update tests
Dec 30, 2019
1182678
Fix syntax errors in decompiled sources
Dec 30, 2019
a7e00d5
Fix syntax errors in decompiled sources
Dec 30, 2019
9c0091c
Fix syntax errors in decompiled sources
Dec 30, 2019
f06bc3a
Fix syntax errors in decompiled sources
Dec 30, 2019
8fee875
Fix syntax errors in decompiled sources
Dec 30, 2019
181341e
Fix syntax errors in decompiled sources
Dec 31, 2019
7b692b7
Fix syntax errors in decompiled sources
Dec 31, 2019
2e3bf63
Fix syntax errors in decompiled sources
Jan 5, 2020
893af8e
Fix syntax errors in decompiled sources
Jan 5, 2020
fe8cab7
Fix syntax errors in decompiled sources
Jan 8, 2020
17ba0e0
Add direct link to Bintray page
Marcono1234 Jan 11, 2020
eb858a6
Merge pull request #9 from Marcono1234/patch-1
emmanue1 Jan 13, 2020
e8b7be6
Fix missing nested class being created with outer name
Marcono1234 Jan 13, 2020
38a1382
Throw descriptive exception when class to decompile cannot be loaded
Marcono1234 Jan 13, 2020
e28cbf8
Remove recursive and redundant equals methods
Marcono1234 Jan 14, 2020
93d8aed
Fix syntax errors in decompiled sources
Jan 20, 2020
7c320be
Fix syntax errors in decompiled sources
Jan 20, 2020
8cd329d
Improve local variable declaration in 'for' statements
Jan 26, 2020
dec5879
Fix bug on instance initializer block
Jan 30, 2020
9daa0e3
Update README.md
Jan 30, 2020
5e334e7
Merge remote-tracking branch 'origin/master'
Jan 30, 2020
723cec9
Merge pull request #18 from Marcono1234/not-loadable-exception
emmanue1 Jan 30, 2020
ac829ef
Merge pull request #27 from Marcono1234/equals-fixes
emmanue1 Jan 30, 2020
2d55f52
Merge pull request #19 from Marcono1234/missing-child-name-fix
emmanue1 Jan 30, 2020
821681a
Minor updates
Jan 30, 2020
dfd7ecf
Simplification of tests
Feb 2, 2020
1210d55
Code reformatting
Feb 2, 2020
7fe6fc1
Improvement of readability of 'new' expressions
Feb 2, 2020
a251735
Minimal code reformatting
Feb 2, 2020
ea7871b
Minor updates
Feb 2, 2020
dd618ae
Fix #34: "Casts are omitted when casting floating point and integers"
Feb 2, 2020
0c61c8a
Split tests
Feb 3, 2020
d369927
Minor updates
Feb 3, 2020
1a880f7
Update test
Feb 3, 2020
55c4460
Update JD collection class
Feb 3, 2020
52dd723
Refactoring to simplify AST exploration
Feb 8, 2020
35717ad
Fix ClassCastException
Feb 8, 2020
0e00948
Simplify AST exploration
Feb 8, 2020
95b4dee
Fix NPE
Feb 9, 2020
6470113
Fix #33 : Cast is not added when overloading method with array parame…
Feb 9, 2020
b4f3fca
Fix exceptions
Feb 9, 2020
45f632b
Fix #14 : Not needed boxing method calls are emitted
Feb 9, 2020
c1d081a
Fix #14 : Not needed boxing method calls are emitted
Feb 9, 2020
5b7fe82
Simplify AST exploration
Feb 10, 2020
f7117ee
Simplify AST exploration
Feb 10, 2020
57a2884
Improve readability of decompiled source code
Feb 10, 2020
c00e0ac
Improvement in determination of types of local variables
Feb 11, 2020
fc27944
Fix bad operand types for binary operator '|'
Feb 12, 2020
36cc906
Fix duplicate local variable errors
Feb 12, 2020
daf99f8
Line number realignment improvement
Feb 12, 2020
524f4d8
Fix local variable reference errors
Feb 12, 2020
3fc80b2
Fix errors on generic type binding
Feb 14, 2020
83633c0
Fix 'byte' cast missing
Feb 14, 2020
809313a
Improvement in determination of types of local variables
Feb 14, 2020
40dfd6c
Fix 'byte' cast missing
Feb 14, 2020
3826d47
Fix generic cast missing
Feb 14, 2020
05ab0ac
Fix 'byte' cast missing
Feb 15, 2020
5707b2b
Fix generic cast missing
Feb 16, 2020
674774a
Fix generic type errors
Feb 18, 2020
6288852
Refactoring
Feb 19, 2020
31dafec
Fix generic cast expression
Feb 19, 2020
14dffa0
Fix generic cast expression
Feb 19, 2020
4155ae8
Fix generic cast expression
Feb 19, 2020
7a80aab
Refactoring
Feb 20, 2020
662fa69
Update ObjectLocalVariable
Feb 21, 2020
49d8eb7
Refactoring
Feb 22, 2020
e46f9dc
Refactoring
Feb 22, 2020
ad96d10
Fix generic cast missing
Feb 22, 2020
27eb220
Refactoring
Feb 23, 2020
0da2e51
Refactoring
Feb 23, 2020
405b0c7
Refactoring
Feb 26, 2020
fafc656
Fix generic cast missing
Feb 26, 2020
938a716
remove uses of jcenter
muandrew Dec 5, 2024
7a740ca
prepare to merge into jd-gui project
muandrew Dec 5, 2024
ec7835a
Merge jd-core into jd-gui
muandrew Dec 5, 2024
1578145
remove dependencies on jcenter from jd-gui
muandrew Dec 5, 2024
cba74c1
make compatible with jdk9+
muandrew Apr 30, 2024
dde6dc5
bump jd-gui patch version to 1.6.7-rc1
muandrew Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 19 additions & 9 deletions app/src/main/java/org/jd/gui/OsxApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@
package org.jd.gui;

import com.apple.eawt.Application;
import org.jd.gui.util.JavaUtil;

import java.awt.*;

public class OsxApp extends App {

@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "Since15"})
public static void main(String[] args) {
// Create an instance of the mac OSX Application class
Application application = Application.getApplication();

App.main(args);
if (JavaUtil.runtimeVersion() <= 8) {
// This method has been deprecated
// https://bugs.openjdk.org/browse/JDK-8160437
// Create an instance of the mac OSX Application class
Application application = Application.getApplication();

// Add an handle invoked when the application is asked to open a list of files
application.setOpenFileHandler(e -> controller.openFiles(e.getFiles()));
// Add an handle invoked when the application is asked to open a list of files
application.setOpenFileHandler(e -> controller.openFiles(e.getFiles()));

// Add an handle invoked when the application is asked to quit
application.setQuitHandler((e, r) -> System.exit(0));
// Add an handle invoked when the application is asked to quit
application.setQuitHandler((e, r) -> System.exit(0));
} else {
Desktop desktop = Desktop.getDesktop();
desktop.setOpenFileHandler(e -> controller.openFiles(e.getFiles()));
desktop.setQuitHandler((e, r) -> System.exit(0));
}
App.main(args);
}
}
20 changes: 20 additions & 0 deletions app/src/main/java/org/jd/gui/util/JavaUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.jd.gui.util;

public class JavaUtil {
/**
* Retrieves the "major" Java version
* 1.8.0_211 == 8, 9.0.1 = 9
* From a post in
* https://stackoverflow.com/questions/2591083/getting-java-version-at-runtime
* @return an integer representing the major Java version of the runtime.
*/
public static int runtimeVersion() {
String version = System.getProperty("java.version");
if(version.startsWith("1.")) {
version = version.substring(2, 3);
} else {
int dot = version.indexOf(".");
if(dot != -1) { version = version.substring(0, dot); }
} return Integer.parseInt(version);
}
}
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:5.3.0' // RPM & DEB support
classpath 'edu.sc.seis.gradle:launch4j:2.4.4'
classpath 'gradle.plugin.edu.sc.seis.gradle:launch4j:2.4.5'
classpath 'net.sf.proguard:proguard-gradle:6.1.0'
}
}
Expand All @@ -15,7 +18,7 @@ apply plugin: 'edu.sc.seis.launch4j'
apply plugin: 'nebula.ospackage'

// Common configuration //
rootProject.version='1.6.6'
rootProject.version='1.6.7-rc1'
rootProject.ext.set('jdCoreVersion', '1.1.3')
targetCompatibility = '1.8'

Expand All @@ -31,7 +34,7 @@ allprojects {
}

repositories {
jcenter()
mavenCentral()
}

configurations {
Expand Down
36 changes: 36 additions & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Java
*.class

# JD
debug*

# Idea
.idea/
out/
*.ipr
*.iml
*.iws

# Eclipse
.settings/
classes/
.classpath
.project

# Mac
.DS_Store

# Windows
Thumbs.db

# Maven
log/
target/

# Gradle
.gradle/
build/
!gradle/wrapper/*

# WinMerge
*.bak
Loading