Skip to content

Commit 6f3caeb

Browse files
committed
handle extensions list properly (fixes processing#4615)
1 parent 1c2787c commit 6f3caeb

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

build/macosx/appbundler/src/com/oracle/appbundler/BundleDocument.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* You should have received a copy of the GNU General Public License version
1919
* 2 along with this work; if not, write to the Free Software Foundation,
2020
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21-
*
21+
*
2222
*/
2323

2424
package com.oracle.appbundler;
@@ -43,67 +43,67 @@ static private String capitalizeFirst(String string) {
4343
stringArray[0] = Character.toUpperCase(stringArray[0]);
4444
return new String(stringArray);
4545
}
46-
46+
4747
public void setExtensions(String extensionsList) {
4848
if(extensionsList == null) {
4949
throw new BuildException("Extensions can't be null");
5050
}
51-
51+
5252
extensions = extensionsList.split(",");
53-
for (String extension : extensions) {
54-
extension.trim().toLowerCase();
53+
for (int i = 0; i < extensions.length; i++) {
54+
extensions[i] = extensions[i].trim().toLowerCase();
5555
}
5656
}
57-
57+
5858
public void setIcon(File icon) {
5959
this.icon = icon;
6060
}
61-
61+
6262
public void setName(String name) {
6363
this.name = name;
6464
}
6565

6666
public void setRole(String role) {
6767
this.role = capitalizeFirst(role);
6868
}
69-
69+
7070
public void setIsPackage(String isPackageString) {
7171
if(isPackageString.trim().equalsIgnoreCase("true")) {
7272
this.isPackage = true;
7373
} else {
7474
this.isPackage = false;
7575
}
7676
}
77-
77+
7878
// public String getIcon() {
7979
// return icon;
8080
// }
81-
81+
8282
public String getIconName() {
8383
return icon.getName();
8484
}
85-
86-
85+
86+
8787
public File getIconFile() {
8888
return icon;
8989
}
90-
90+
9191
public String getName() {
9292
return name;
9393
}
9494

9595
public String getRole() {
9696
return role;
9797
}
98-
98+
9999
public String[] getExtensions() {
100100
return extensions;
101101
}
102-
102+
103103
public boolean hasIcon() {
104104
return icon != null;
105105
}
106-
106+
107107
public boolean isPackage() {
108108
return isPackage;
109109
}
@@ -115,7 +115,7 @@ public String toString() {
115115
for(String extension : extensions) {
116116
s.append(extension).append(" ");
117117
}
118-
118+
119119
return s.toString();
120120
}
121121
}

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ X update the Linux notes based on where we land on this
1616
X https://github.com/processing/processing/wiki/Supported-Platforms#linux
1717
X "Could not open the url" when clicking on the error message
1818
X https://github.com/processing/processing/issues/4695
19+
X fix extensions handling in CFBundleDocument code from appbundler
20+
X https://github.com/processing/processing/issues/4615
1921

2022
_ update launch4j to 3.9
2123
_ https://sourceforge.net/projects/launch4j/files/launch4j-3/3.9/

0 commit comments

Comments
 (0)