1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
|
--- Makefile.in 2014-04-02 06:21:18.672343000 -0400
+++ Makefile.in 2014-05-15 18:30:56.000000000 -0400
@@ -769,8 +769,8 @@
# Flags
export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
-export IT_LANGUAGE_SOURCE_VERSION=6
-export IT_CLASS_TARGET_VERSION=6
+export IT_LANGUAGE_SOURCE_VERSION=7
+export IT_CLASS_TARGET_VERSION=7
export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
#
--- configure 2014-04-02 06:21:18.000335000 -0400
+++ configure 2014-05-15 17:04:42.000000000 -0400
@@ -626,6 +626,8 @@
VERSION_DEFS
HAVE_JAVA7_FALSE
HAVE_JAVA7_TRUE
+HAVE_JAVA8_FALSE
+HAVE_JAVA8_TRUE
JAVA
SYSTEM_JRE_DIR
X11_LIBS
@@ -7226,8 +7228,9 @@
JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/[^"]*"\(.*\)"$/\1/p'`
HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'`
- if ! test -z "$HAVE_JAVA7" ; then
- VERSION_DEFS='-DHAVE_JAVA7'
+ HAVE_JAVA8=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.8) print "yes"}'`
+ if ! test -z "$HAVE_JAVA8" ; then
+ VERSION_DEFS='-DHAVE_JAVA8'
fi
if test x"${HAVE_JAVA7}" = "xyes" ; then
@@ -7237,6 +7240,13 @@
HAVE_JAVA7_TRUE='#'
HAVE_JAVA7_FALSE=
fi
+if test x"${HAVE_JAVA8}" = "xyes" ; then
+ HAVE_JAVA8_TRUE=
+ HAVE_JAVA8_FALSE='#'
+else
+ HAVE_JAVA8_TRUE='#'
+ HAVE_JAVA8_FALSE=
+fi
@@ -10444,6 +10454,10 @@
as_fn_error $? "conditional \"HAVE_JAVA7\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_JAVA8_TRUE}" && test -z "${HAVE_JAVA8_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JAVA8\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${WITH_XSLTPROC_TRUE}" && test -z "${WITH_XSLTPROC_FALSE}"; then
as_fn_error $? "conditional \"WITH_XSLTPROC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
--- netx/net/sourceforge/jnlp/JNLPFile.java 2014-04-02 06:20:59.682125000 -0400
+++ netx/net/sourceforge/jnlp/JNLPFile.java 2014-05-15 16:57:19.000000000 -0400
@@ -267,7 +267,6 @@
/**
* Create a JNLPFile from an input stream.
*
- * @throws IOException if an IO exception occurred
* @throws ParseException if the JNLP file was invalid
*/
public JNLPFile(InputStream input, ParserSettings settings) throws ParseException {
@@ -281,7 +280,6 @@
* @param input input stream of JNLP file.
* @param codebase codebase to use if not specified in JNLP file..
* @param settings the {@link ParserSettings} to use when parsing
- * @throws IOException if an IO exception occurred
* @throws ParseException if the JNLP file was invalid
*/
public JNLPFile(InputStream input, URL codebase, ParserSettings settings) throws ParseException {
--- netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java 2014-04-02 06:20:59.683125000 -0400
+++ netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java 2014-05-15 16:57:19.000000000 -0400
@@ -292,12 +292,13 @@
settingsPanel.add(p, panel.toString());
}
- final JList settingsList = new JList(panels);
+ final JList<SettingsPanel> settingsList = new JList<>(panels);
settingsList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
- JList list = (JList) e.getSource();
- SettingsPanel panel = (SettingsPanel) list.getSelectedValue();
+ @SuppressWarnings("unchecked")
+ JList<SettingsPanel> list = (JList<SettingsPanel>) e.getSource();
+ SettingsPanel panel = list.getSelectedValue();
CardLayout cl = (CardLayout) settingsPanel.getLayout();
cl.show(settingsPanel, panel.toString());
}
--- netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java 2014-04-02 06:20:59.683125000 -0400
+++ netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java 2014-05-15 16:57:19.000000000 -0400
@@ -27,6 +27,7 @@
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JCheckBox;
@@ -36,6 +37,7 @@
import javax.swing.JTextField;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
+
import net.sourceforge.jnlp.config.Defaults;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.Translator;
@@ -139,7 +141,7 @@
new ComboItem(Translator.R("DPShowJavawsOnly"), DeploymentConfiguration.CONSOLE_SHOW_JAVAWS) };
JLabel consoleLabel = new JLabel(Translator.R("DPJavaConsole"));
- JComboBox consoleComboBox = new JComboBox();
+ JComboBox<ComboItem> consoleComboBox = new JComboBox<>();
consoleComboBox.setActionCommand(DeploymentConfiguration.KEY_CONSOLE_STARTUP_MODE); // The property this comboBox affects.
JPanel consolePanel = new JPanel();
@@ -201,7 +203,6 @@
}
@Override
- @SuppressWarnings("unchecked")
public void itemStateChanged(ItemEvent e) {
Object o = e.getSource();
@@ -210,7 +211,8 @@
JCheckBox jcb = (JCheckBox) o;
config.setProperty(jcb.getActionCommand(), String.valueOf(jcb.isSelected()));
} else if (o instanceof JComboBox) {
- JComboBox jcb = (JComboBox) o;
+ @SuppressWarnings("unchecked")
+ JComboBox<ComboItem> jcb = (JComboBox<ComboItem>) o;
ComboItem c = (ComboItem) e.getItem();
config.setProperty(jcb.getActionCommand(), c.getValue());
}
--- netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java 2014-04-02 06:20:59.683125000 -0400
+++ netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java 2014-05-15 16:57:19.000000000 -0400
@@ -62,7 +62,7 @@
private void addComponents() {
GridBagConstraints c = new GridBagConstraints();
JLabel description = new JLabel("<html>" + Translator.R("CPDesktopIntegrationDescription") + "<hr /></html>");
- JComboBox shortcutComboOptions = new JComboBox();
+ JComboBox<ComboItem> shortcutComboOptions = new JComboBox<>();
ComboItem[] items = { new ComboItem(Translator.R("DSPNeverCreate"), "NEVER"),
new ComboItem(Translator.R("DSPAlwaysAllow"), "ALWAYS"),
new ComboItem(Translator.R("DSPAskUser"), "ASK_USER"),
@@ -94,8 +94,9 @@
add(filler, c);
}
+ @SuppressWarnings("unchecked")
public void itemStateChanged(ItemEvent e) {
ComboItem c = (ComboItem) e.getItem();
- config.setProperty(((JComboBox) e.getSource()).getActionCommand(), c.getValue());
+ config.setProperty(((JComboBox<ComboItem>) e.getSource()).getActionCommand(), c.getValue());
}
}
--- netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java 2014-04-02 06:20:59.683125000 -0400
+++ netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java 2014-05-15 16:57:19.000000000 -0400
@@ -163,7 +163,7 @@
new ComboItem("7", "7"),
new ComboItem("8", "8"),
new ComboItem(Translator.R("TIFPMax"), "9"), };
- JComboBox cbCompression = new JComboBox(compressionOptions);
+ JComboBox<ComboItem> cbCompression = new JComboBox<>(compressionOptions);
cbCompression.setSelectedIndex(Integer.parseInt(this.config.getProperty(properties[3])));
cbCompression.addItemListener(new ItemListener() {
@Override
--- netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java 2014-05-15 16:57:19.000000000 -0400
@@ -1,75 +0,0 @@
-/* VariableX509TrustManagerJDK6.java
- Copyright (C) 2012 Red Hat, Inc.
-
-This file is part of IcedTea.
-
-IcedTea is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.
-
-IcedTea is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with IcedTea; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version.
-*/
-
-package net.sourceforge.jnlp.security;
-
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
-
-public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager {
-
- private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance();
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- checkClientTrusted(chain, authType, null, null);
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */);
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return vX509TM.getAcceptedIssuers();
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException {
- vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException {
- // We don't need to pass algorithm, we will always use this for TLS only
- vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */);
- }
-
-}
--- netx/net/sourceforge/jnlp/security/policyeditor/CustomPolicyViewer.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/policyeditor/CustomPolicyViewer.java 2014-05-15 16:57:20.000000000 -0400
@@ -66,14 +66,14 @@
*/
public class CustomPolicyViewer extends JFrame {
- private final Collection<CustomPermission> customPermissions = new TreeSet<CustomPermission>();
+ private final Collection<CustomPermission> customPermissions = new TreeSet<>();
private final JScrollPane scrollPane = new JScrollPane();
- private final DefaultListModel listModel = new DefaultListModel();
- private final JList list = new JList(listModel);
+ private final DefaultListModel<CustomPermission> listModel = new DefaultListModel<>();
+ private final JList<CustomPermission> list = new JList<>(listModel);
private final JButton addButton = new JButton(), removeButton = new JButton(), closeButton = new JButton();
private final JLabel listLabel = new JLabel();
private final ActionListener addButtonAction, removeButtonAction, closeButtonAction;
- private final WeakReference<CustomPolicyViewer> weakThis = new WeakReference<CustomPolicyViewer>(this);
+ private final WeakReference<CustomPolicyViewer> weakThis = new WeakReference<>(this);
/**
* @param parent the parent PolicyEditor which created this CustomPolicyViewer
--- netx/net/sourceforge/jnlp/security/policyeditor/PermissionActions.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/policyeditor/PermissionActions.java 2014-05-15 16:57:20.000000000 -0400
@@ -88,7 +88,7 @@
}
private static Set<String> setFromString(final String string) {
- final Set<String> set = new HashSet<String>();
+ final Set<String> set = new HashSet<>();
Collections.addAll(set, string.split(","));
return set;
}
--- netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java 2014-05-15 16:57:20.000000000 -0400
@@ -165,18 +165,18 @@
private File file;
private boolean changesMade = false;
private boolean closed = false;
- private final Map<String, Map<PolicyEditorPermissions, Boolean>> codebasePermissionsMap = new HashMap<String, Map<PolicyEditorPermissions, Boolean>>();
- private final Map<String, Set<CustomPermission>> customPermissionsMap = new HashMap<String, Set<CustomPermission>>();
- private final Map<PolicyEditorPermissions, JCheckBox> checkboxMap = new TreeMap<PolicyEditorPermissions, JCheckBox>();
- private final List<JCheckBoxWithGroup> groupBoxList = new ArrayList<JCheckBoxWithGroup>(Group.values().length);
+ private final Map<String, Map<PolicyEditorPermissions, Boolean>> codebasePermissionsMap = new HashMap<>();
+ private final Map<String, Set<CustomPermission>> customPermissionsMap = new HashMap<>();
+ private final Map<PolicyEditorPermissions, JCheckBox> checkboxMap = new TreeMap<>();
+ private final List<JCheckBoxWithGroup> groupBoxList = new ArrayList<>(Group.values().length);
private final JScrollPane scrollPane = new JScrollPane();
- private final DefaultListModel listModel = new DefaultListModel();
- private final JList list = new JList(listModel);
+ private final DefaultListModel<String> listModel = new DefaultListModel<>();
+ private final JList<String> list = new JList<>(listModel);
private final JButton okButton = new JButton(), closeButton = new JButton(),
addCodebaseButton = new JButton(), removeCodebaseButton = new JButton();
private final JFileChooser fileChooser;
private CustomPolicyViewer cpViewer = null;
- private final WeakReference<PolicyEditor> weakThis = new WeakReference<PolicyEditor>(this);
+ private final WeakReference<PolicyEditor> weakThis = new WeakReference<>(this);
private MD5SumWatcher fileWatcher;
private final ActionListener okButtonAction, addCodebaseButtonAction,
@@ -196,13 +196,13 @@
return group;
}
- private void setState(Map<PolicyEditorPermissions, Boolean> map) {
- List<ActionListener> backup = new LinkedList<ActionListener>();
+ private void setState(final Map<PolicyEditorPermissions, Boolean> map) {
+ final List<ActionListener> backup = new LinkedList<>();
for (final ActionListener l : this.getActionListeners()) {
backup.add(l);
this.removeActionListener(l);
}
- int i = group.getState(map);
+ final int i = group.getState(map);
this.setBackground(getParent().getBackground());
if (i > 0) {
this.setSelected(true);
@@ -215,7 +215,7 @@
this.setSelected(false);
}
- for (ActionListener al : backup) {
+ for (final ActionListener al : backup) {
this.addActionListener(al);
}
}
@@ -273,7 +273,7 @@
removeCodebaseButtonAction = new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
- removeCodebase((String) list.getSelectedValue());
+ removeCodebase(getSelectedCodebase());
}
};
removeCodebaseButton.setText(R("PERemoveCodebase"));
@@ -324,7 +324,7 @@
@Override
public void run() {
String codebase = getSelectedCodebase();
- if (codebase == null){
+ if (codebase == null) {
return;
}
if (cpViewer == null) {
@@ -343,9 +343,9 @@
setupLayout();
}
-
+
private String getSelectedCodebase() {
- String codebase = (String) list.getSelectedValue();
+ final String codebase = list.getSelectedValue();
if (codebase == null || codebase.isEmpty()) {
return null;
}
@@ -355,7 +355,7 @@
return codebase;
}
- private static void preparePolicyEditorWindow(final PolicyEditorWindow w, PolicyEditor e) {
+ private static void preparePolicyEditorWindow(final PolicyEditorWindow w, final PolicyEditor e) {
w.setModalityType(ModalityType.MODELESS); //at least some default
w.setPolicyEditor(e);
w.setTitle(R("PETitle"));
@@ -386,7 +386,6 @@
editor.closeButton.setText(R("ButClose"));
editor.closeButton.addActionListener(editor.closeButtonAction);
-
final Action saveAct = new AbstractAction() {
@Override
public void actionPerformed(final ActionEvent e) {
@@ -437,7 +436,7 @@
private PolicyEditorFrame(final PolicyEditor editor) {
super();
- preparePolicyEditorWindow((PolicyEditorWindow)this, editor);
+ preparePolicyEditorWindow((PolicyEditorWindow) this, editor);
}
@Override
@@ -451,17 +450,17 @@
}
@Override
- public final void setPolicyEditor(PolicyEditor e) {
+ public final void setPolicyEditor(final PolicyEditor e) {
editor = e;
}
@Override
- public final void setDefaultCloseOperation(int operation) {
+ public final void setDefaultCloseOperation(final int operation) {
super.setDefaultCloseOperation(operation);
}
@Override
- public final void setJMenuBar(JMenuBar menu) {
+ public final void setJMenuBar(final JMenuBar menu) {
super.setJMenuBar(menu);
}
@@ -471,7 +470,7 @@
}
@Override
- public void setModalityType(ModalityType type) {
+ public void setModalityType(final ModalityType type) {
//no op for frame
}
@@ -502,11 +501,11 @@
private PolicyEditorDialog(final PolicyEditor editor) {
super();
- preparePolicyEditorWindow((PolicyEditorWindow)this, editor);
+ preparePolicyEditorWindow((PolicyEditorWindow) this, editor);
}
@Override
- public final void setTitle(String title) {
+ public final void setTitle(final String title) {
super.setTitle(title);
}
@@ -516,17 +515,17 @@
}
@Override
- public final void setPolicyEditor(PolicyEditor e) {
+ public final void setPolicyEditor(final PolicyEditor e) {
editor = e;
}
@Override
- public final void setDefaultCloseOperation(int operation) {
+ public final void setDefaultCloseOperation(final int operation) {
super.setDefaultCloseOperation(operation);
}
@Override
- public final void setJMenuBar(JMenuBar menu) {
+ public final void setJMenuBar(final JMenuBar menu) {
super.setJMenuBar(menu);
}
@@ -536,7 +535,7 @@
}
@Override
- public void setModalityType(ModalityType type) {
+ public void setModalityType(final ModalityType type) {
super.setModalityType(type);
}
@@ -641,7 +640,7 @@
final Action act = new AbstractAction() {
@Override
public void actionPerformed(final ActionEvent e) {
- removeCodebase((String) list.getSelectedValue());
+ removeCodebase(getSelectedCodebase());
}
};
setAccelerator(R("PERemoveCodebaseMnemonic"), ActionEvent.ALT_MASK, act, "RemoveCodebaseAccelerator");
@@ -726,6 +725,7 @@
stopAsking = true;
}
} catch (final MalformedURLException mfue) {
+ // ignore - loop/ask again
}
}
addNewCodebase(codebase);
@@ -773,7 +773,7 @@
if (permissions != null) {
return new HashMap<PolicyEditorPermissions, Boolean>(permissions);
} else {
- final Map<PolicyEditorPermissions, Boolean> blank = new HashMap<PolicyEditorPermissions, Boolean>();
+ final Map<PolicyEditorPermissions, Boolean> blank = new HashMap<>();
for (final PolicyEditorPermissions perm : PolicyEditorPermissions.values()) {
blank.put(perm, false);
}
@@ -800,10 +800,10 @@
*/
private void updateCheckboxes(final String codebase) {
try {
- if (SwingUtilities.isEventDispatchThread()){
- updateCheckboxesImpl(codebase);
+ if (SwingUtilities.isEventDispatchThread()) {
+ updateCheckboxesImpl(codebase);
} else {
- updateCheckboxesInvokeAndWait(codebase);
+ updateCheckboxesInvokeAndWait(codebase);
}
} catch (InterruptedException ex) {
OutputController.getLogger().log(ex);
@@ -811,52 +811,52 @@
OutputController.getLogger().log(ex);
}
}
-
+
private void updateCheckboxesInvokeAndWait(final String codebase) throws InterruptedException, InvocationTargetException {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
- updateCheckboxesImpl(codebase);
+ updateCheckboxesImpl(codebase);
}
});
}
-
- private void updateCheckboxesImpl(String codebase) {
- for (final PolicyEditorPermissions perm : PolicyEditorPermissions.values()) {
- final JCheckBox box = checkboxMap.get(perm);
- for (final ActionListener l : box.getActionListeners()) {
- box.removeActionListener(l);
- }
- initializeMapForCodebase(codebase);
- final Map<PolicyEditorPermissions, Boolean> map = codebasePermissionsMap.get(codebase);
- final boolean state;
- if (map != null) {
- final Boolean s = map.get(perm);
- if (s != null) {
- state = s;
- } else {
- state = false;
- }
- } else {
- state = false;
- }
+
+ private void updateCheckboxesImpl(final String codebase) {
+ for (final PolicyEditorPermissions perm : PolicyEditorPermissions.values()) {
+ final JCheckBox box = checkboxMap.get(perm);
+ for (final ActionListener l : box.getActionListeners()) {
+ box.removeActionListener(l);
+ }
+ initializeMapForCodebase(codebase);
+ final Map<PolicyEditorPermissions, Boolean> map = codebasePermissionsMap.get(codebase);
+ final boolean state;
+ if (map != null) {
+ final Boolean s = map.get(perm);
+ if (s != null) {
+ state = s;
+ } else {
+ state = false;
+ }
+ } else {
+ state = false;
+ }
+ for (final JCheckBoxWithGroup jg : groupBoxList) {
+ jg.setState(map);
+ }
+ box.setSelected(state);
+ box.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+ changesMade = true;
+ map.put(perm, box.isSelected());
for (JCheckBoxWithGroup jg : groupBoxList) {
jg.setState(map);
}
- box.setSelected(state);
- box.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(final ActionEvent e) {
- changesMade = true;
- map.put(perm, box.isSelected());
- for (JCheckBoxWithGroup jg : groupBoxList) {
- jg.setState(map);
- }
- }
- });
}
- }
+ });
+ }
+ }
/**
* Set a mnemonic key for a menu item or button
@@ -947,8 +947,8 @@
checkboxConstraints.gridy = 1;
for (final JCheckBox box : checkboxMap.values()) {
- if (PolicyEditorPermissions.Group.anyContains(box, checkboxMap)){
- //do not show boxes in any group
+ if (PolicyEditorPermissions.Group.anyContains(box, checkboxMap)) {
+ //do not show boxes in any group
continue;
}
add(box, checkboxConstraints);
@@ -960,7 +960,7 @@
}
}
//add groups
- for (PolicyEditorPermissions.Group g : PolicyEditorPermissions.Group.values()) {
+ for (final PolicyEditorPermissions.Group g : PolicyEditorPermissions.Group.values()) {
//no metter what, put group title on new line
checkboxConstraints.gridy++;
//all groups are in second column
@@ -977,14 +977,14 @@
groupPanel.setVisible(!groupPanel.isVisible());
PolicyEditor.this.validate();
Container c = PolicyEditor.this.getParent();
- //find the window and repack it
+ // find the window and repack it
while (!(c instanceof Window)) {
if (c == null) {
return;
}
c = c.getParent();
}
- Window w = (Window) c;
+ final Window w = (Window) c;
w.pack();
}
@@ -993,34 +993,34 @@
groupCh.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- String codebase = getSelectedCodebase();
+ final String codebase = getSelectedCodebase();
if (codebase == null) {
return;
}
- List<ActionListener> backup = new LinkedList<ActionListener>();
+ List<ActionListener> backup = new LinkedList<>();
for (final ActionListener l : groupCh.getActionListeners()) {
backup.add(l);
groupCh.removeActionListener(l);
}
final Map<PolicyEditorPermissions, Boolean> map = codebasePermissionsMap.get(codebase);
- for (PolicyEditorPermissions p : groupCh.getGroup().getPermissions()) {
+ for (final PolicyEditorPermissions p : groupCh.getGroup().getPermissions()) {
map.put(p, groupCh.isSelected());
}
changesMade = true;
updateCheckboxes(codebase);
- for (ActionListener al : backup) {
+ for (final ActionListener al : backup) {
groupCh.addActionListener(al);
}
}
});
add(groupCh, checkboxConstraints);
- //place panel with mebers below the title
+ // place panel with members below the title
checkboxConstraints.gridy++;
checkboxConstraints.gridx = 2;
- //spread group's panel over two columns
+ // spread group's panel over two columns
checkboxConstraints.gridwidth = 2;
- checkboxConstraints.fill = checkboxConstraints.BOTH;
+ checkboxConstraints.fill = GridBagConstraints.BOTH;
add(groupPanel, checkboxConstraints);
final GridBagConstraints groupCheckboxLabelConstraints = new GridBagConstraints();
groupCheckboxLabelConstraints.anchor = GridBagConstraints.LINE_START;
@@ -1028,7 +1028,7 @@
groupCheckboxLabelConstraints.weighty = 0;
groupCheckboxLabelConstraints.gridx = 1;
groupCheckboxLabelConstraints.gridy = 1;
- for (PolicyEditorPermissions p : g.getPermissions()) {
+ for (final PolicyEditorPermissions p : g.getPermissions()) {
groupPanel.add(checkboxMap.get(p), groupCheckboxLabelConstraints);
// Two columns of checkboxes
groupCheckboxLabelConstraints.gridx++;
@@ -1042,7 +1042,6 @@
checkboxConstraints.gridwidth = 1;
}
-
final JLabel codebaseListLabel = new JLabel(R("PECodebaseLabel"));
codebaseListLabel.setBorder(new EmptyBorder(2, 2, 2, 2));
final GridBagConstraints listLabelConstraints = new GridBagConstraints();
@@ -1152,7 +1151,7 @@
// If this fails we'll end up handling it a few lines down anyway.
}
}
- OpenFileResult ofr = FileUtils.testFilePermissions(file);
+ final OpenFileResult ofr = FileUtils.testFilePermissions(file);
if (ofr == OpenFileResult.FAILURE || ofr == OpenFileResult.NOT_FILE) {
FileUtils.showCouldNotOpenFilepathDialog(weakThis.get(), file.getPath());
return;
@@ -1258,7 +1257,7 @@
}
if (codebasePermissionsMap.get(codebase) == null) {
- final Map<PolicyEditorPermissions, Boolean> map = new HashMap<PolicyEditorPermissions, Boolean>();
+ final Map<PolicyEditorPermissions, Boolean> map = new HashMap<>();
for (final PolicyEditorPermissions perm : PolicyEditorPermissions.values()) {
map.put(perm, false);
}
@@ -1266,7 +1265,7 @@
}
if (customPermissionsMap.get(codebase) == null) {
- final Set<CustomPermission> set = new HashSet<CustomPermission>();
+ final Set<CustomPermission> set = new HashSet<>();
customPermissionsMap.put(codebase, set);
}
@@ -1307,8 +1306,10 @@
}
final StringBuilder sb = new StringBuilder();
sb.append(AUTOGENERATED_NOTICE);
- sb.append("\n/* Generated by PolicyEditor at ").append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- .format(Calendar.getInstance().getTime())).append(" */").append(System.getProperty("line.separator"));
+ sb.append("\n/* Generated by PolicyEditor at ")
+ .append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()))
+ .append(" */")
+ .append(System.getProperty("line.separator"));
final Set<PolicyEditorPermissions> enabledPermissions = new HashSet<PolicyEditorPermissions>();
FileLock fileLock;
try {
@@ -1456,7 +1457,7 @@
*/
static Map<String, String> argsToMap(final String[] args) {
final List<String> argsList = Arrays.<String> asList(args);
- final Map<String, String> map = new HashMap<String, String>();
+ final Map<String, String> map = new HashMap<>();
if (argsList.contains(HELP_FLAG)) {
map.put(HELP_FLAG, null);
--- netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditorPermissions.java 2014-08-14 06:15:47.038832000 -0400
+++ netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditorPermissions.java 2014-10-21 18:32:55.000000000 -0400
@@ -128,12 +128,13 @@
private final PolicyEditorPermissions[] permissions;
private final String title;
- private Group(String title, PolicyEditorPermissions... permissions) {
+
+ private Group(final String title, final PolicyEditorPermissions... permissions) {
this.title = title;
this.permissions = permissions;
}
- public static boolean anyContains(PolicyEditorPermissions permission) {
+ public static boolean anyContains(final PolicyEditorPermissions permission) {
for (final Group g : Group.values()) {
if (g.contains(permission)) {
return true;
@@ -142,10 +143,10 @@
return false;
}
- public static boolean anyContains(JCheckBox view, Map<PolicyEditorPermissions, JCheckBox> checkboxMap) {
- for (Map.Entry<PolicyEditorPermissions, JCheckBox> pairs : checkboxMap.entrySet()){
+ public static boolean anyContains(final JCheckBox view, final Map<PolicyEditorPermissions, JCheckBox> checkboxMap) {
+ for (final Map.Entry<PolicyEditorPermissions, JCheckBox> pairs : checkboxMap.entrySet()) {
if (pairs.getValue() == view) {
- for (Group g : Group.values()) {
+ for (final Group g : Group.values()) {
if (g.contains(pairs.getKey())) {
return true;
}
@@ -161,10 +162,10 @@
* - none is selected
*/
public int getState (final Map<PolicyEditorPermissions, Boolean> map) {
- boolean allTrue=true;
- boolean allFalse=true;
- for (PolicyEditorPermissions pp: getPermissions()){
- Boolean b = map.get(pp);
+ boolean allTrue = true;
+ boolean allFalse = true;
+ for (final PolicyEditorPermissions pp : getPermissions()) {
+ final Boolean b = map.get(pp);
if (b == null){
return 0;
}
@@ -174,23 +175,22 @@
allTrue = false;
}
}
- if (allFalse){
+ if (allFalse) {
return -1;
}
- if (allTrue){
+ if (allTrue) {
return 1;
}
return 0;
}
- public boolean contains(PolicyEditorPermissions permission) {
- for (PolicyEditorPermissions policyEditorPermissions : permissions) {
+ public boolean contains(final PolicyEditorPermissions permission) {
+ for (final PolicyEditorPermissions policyEditorPermissions : permissions) {
if (policyEditorPermissions == permission) {
return true;
}
}
return false;
-
}
public String getTitle() {
@@ -203,7 +203,7 @@
}
-
+
private final String name, description;
private final PermissionType type;
private final PermissionTarget target;
--- netx/net/sourceforge/jnlp/security/policyeditor/PolicyEntry.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/policyeditor/PolicyEntry.java 2014-05-15 16:57:20.000000000 -0400
@@ -51,8 +51,8 @@
public class PolicyEntry {
private final String codebase;
- private final Set<PolicyEditorPermissions> permissions = new HashSet<PolicyEditorPermissions>();
- private final Set<CustomPermission> customPermissions = new HashSet<CustomPermission>();
+ private final Set<PolicyEditorPermissions> permissions = new HashSet<>();
+ private final Set<CustomPermission> customPermissions = new HashSet<>();
public PolicyEntry(final String codebase, final Collection<PolicyEditorPermissions> permissions,
final Collection<CustomPermission> customPermissions) {
--- netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java 2014-04-02 06:20:59.679124000 -0400
+++ netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java 2014-05-15 16:57:20.000000000 -0400
@@ -108,7 +108,7 @@
JTabbedPane tabbedPane;
private final JTable userTable;
private final JTable systemTable;
- private JComboBox certificateTypeCombo;
+ private JComboBox<CertificateType> certificateTypeCombo;
private KeyStores.Type currentKeyStoreType;
private KeyStores.Level currentKeyStoreLevel;
@@ -130,7 +130,7 @@
userTable = new JTable(null);
systemTable = new JTable(null);
- disableForSystem = new ArrayList<JComponent>();
+ disableForSystem = new ArrayList<>();
addComponents();
@@ -165,7 +165,7 @@
JLabel certificateTypeLabel = new JLabel(R("CVCertificateType"));
- certificateTypeCombo = new JComboBox(certificateTypes);
+ certificateTypeCombo = new JComboBox<>(certificateTypes);
certificateTypeCombo.addActionListener(new CertificateTypeListener());
certificateTypePanel.add(certificateTypeLabel, BorderLayout.LINE_START);
@@ -257,7 +257,7 @@
private void readKeyStore() {
Enumeration<String> aliases = null;
- certs = new ArrayList<X509Certificate>();
+ certs = new ArrayList<>();
try {
//Get all of the X509Certificates and put them into an ArrayList
@@ -279,7 +279,7 @@
SecurityUtil.getCN(c.getIssuerX500Principal().getName());
}
} catch (Exception e) {
- //TODO
+ // TODO handle exception
OutputController.getLogger().log(OutputController.Level.ERROR_ALL, e);
}
}
@@ -314,9 +314,7 @@
if (result == JOptionPane.OK_OPTION) {
return jpf.getPassword();
}
- else {
- return null;
- }
+ return null;
}
/** Allows storing KeyStores.Types in a JComponent */
@@ -342,7 +340,7 @@
@Override
@SuppressWarnings("unchecked")//this is just certificateTypeCombo, nothing else
public void actionPerformed(ActionEvent e) {
- JComboBox source = (JComboBox) e.getSource();
+ JComboBox<CertificateType> source = (JComboBox<CertificateType>) e.getSource();
CertificateType type = (CertificateType) source.getSelectedItem();
currentKeyStoreType = type.getType();
repopulateTables();
--- netx/net/sourceforge/jnlp/util/FileUtils.java 2014-04-02 06:20:59.685125000 -0400
+++ netx/net/sourceforge/jnlp/util/FileUtils.java 2014-05-15 16:57:20.000000000 -0400
@@ -394,7 +394,6 @@
/**
* Show a dialog informing the user that the file could not be opened
* @param frame a {@link JFrame} to act as parent to this dialog
- * @param filePath a {@link String} representing the path to the file we failed to open
* @param message a {@link String} giving the specific reason the file could not be opened
*/
public static void showCouldNotOpenDialog(final Component frame, final String message) {
--- netx/net/sourceforge/jnlp/util/JarFile.java 2014-04-02 06:20:59.685125000 -0400
+++ netx/net/sourceforge/jnlp/util/JarFile.java 2014-05-15 16:57:20.000000000 -0400
@@ -43,94 +43,82 @@
import java.io.InputStream;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
-//in jdk6 java.util.jar.JarFile is not Closeable - fixing
-//overwritening class can add duplicate occurence of interface so this should be perfectly safe
-public class JarFile extends java.util.jar.JarFile implements Closeable{
+/**
+ * A wrapper over {@link java.util.jar.JarFile} that verifies zip headers to
+ * protect against GIFAR attacks.
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Gifar">Gifar</a>
+ */
+public class JarFile extends java.util.jar.JarFile implements Closeable {
public JarFile(String name) throws IOException {
- super(name);
- verifyZipHeader(new File(name));
+ super(name);
+ verifyZipHeader(new File(name));
}
- /**
- */
public JarFile(String name, boolean verify) throws IOException {
super(name, verify);
verifyZipHeader(new File(name));
}
- /**
- */
public JarFile(File file) throws IOException {
super(file);
verifyZipHeader(file);
}
- /**
- */
public JarFile(File file, boolean verify) throws IOException {
super(file, verify);
verifyZipHeader(file);
}
- /*
- */
public JarFile(File file, boolean verify, int mode) throws IOException {
super(file, verify, mode);
- verifyZipHeader(file);
+ verifyZipHeader(file);
}
-
-
-
-
+
/**
- * According to specification -
- * http://www.pkware.com/documents/casestudies/APPNOTE.TXT or just google
- * around zip header all entries in zip-compressed must start with well
- * known "PK" which is defined as hexa x50 x4b x03 x04, which in decimal are
- * 80 75 3 4.
- *
+ * The ZIP specification requires that the zip header for all entries in a
+ * zip-compressed archive must start with a well known "PK" which is
+ * defined as hex x50 x4b x03 x04.
+ * <p>
* Note - this is not file-header, it is item-header.
- *
- * Actually most of compressing formats have some n-bytes header se eg:
+ * <p>
+ * Actually most of compressing formats have some n-bytes headers. Eg:
* http://www.gzip.org/zlib/rfc-gzip.html#header-trailer for ID1 and ID2 so
* in case that some differently compressed jars will come to play, this is
- * the palce where to fix it.
+ * the place where to fix it.
*
+ * @see <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">ZIP Specification</a>
*/
- private static final byte[] ZIP_LOCAL_FILE_HEADER_SIGNATURE = new byte[]{80, 75, 3, 4};
+ private static final byte[] ZIP_ENTRY_HEADER_SIGNATURE = new byte[] {0x50, 0x4b, 0x03, 0x04};
/**
- * This method is checking first four bytes of jar-file against
- * ZIP_LOCAL_FILE_HEADER_SIGNATURE
- *
+ * Verify the header for the zip entry.
+ * <p>
* Although zip specification allows to skip all corrupted entries, it is
- * not safe for jars. If first four bytes of file are not zip
- * ZIP_LOCAL_FILE_HEADER_SIGNATURE then exception is thrown
- *
- * As noted, ZIP_LOCAL_FILE_HEADER_SIGNATURE is not ile-header, but is item-header.
- * Possible attack is using the fact that entries without header are considered
- * corrupted and so can be ignoered. However, for other they can have some meaning.
- *
- * So for our purposes we must insists on first record to be valid.
- *
- * @param file
- * @throws IOException
- * @throws InvalidJarHeaderException
+ * not safe for jars since it allows a different format to fake itself as
+ * a Jar.
*/
- public static void verifyZipHeader(File file) throws IOException {
+ private void verifyZipHeader(File file) throws IOException {
if (!JNLPRuntime.isIgnoreHeaders()) {
InputStream s = new FileInputStream(file);
+
+ /*
+ * Theoretically, a valid ZIP file can begin with anything. We
+ * ensure it begins with a valid entry header to confirm it only
+ * contains zip entries.
+ */
+
try {
- byte[] buffer = new byte[ZIP_LOCAL_FILE_HEADER_SIGNATURE.length];
+ byte[] buffer = new byte[ZIP_ENTRY_HEADER_SIGNATURE.length];
/*
* for case that new byte[] will accidently initialize same
* sequence as zip header and during the read the buffer will not be filled
- */
+ */
for (int i = 0; i < buffer.length; i++) {
buffer[i] = 0;
}
- int toRead = ZIP_LOCAL_FILE_HEADER_SIGNATURE.length;
+ int toRead = ZIP_ENTRY_HEADER_SIGNATURE.length;
int readSoFar = 0;
int n = 0;
/*
@@ -144,7 +132,7 @@
}
}
for (int i = 0; i < buffer.length; i++) {
- if (buffer[i] != ZIP_LOCAL_FILE_HEADER_SIGNATURE[i]) {
+ if (buffer[i] != ZIP_ENTRY_HEADER_SIGNATURE[i]) {
throw new InvalidJarHeaderException("Jar " + file.getName() + " do not heave valid header. You can skip this check by -Xignoreheaders");
}
}
--- netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPane.java 2014-08-14 06:15:47.055833000 -0400
+++ netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPane.java 2014-10-21 19:02:25.000000000 -0400
@@ -17,6 +17,7 @@
import java.util.Observer;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
+
import javax.swing.ButtonGroup;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
@@ -41,6 +42,7 @@
import javax.swing.text.Document;
import javax.swing.text.PlainDocument;
import javax.swing.text.html.HTMLDocument;
+
import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.runtime.Translator;
import net.sourceforge.jnlp.util.logging.headers.ObservableMessagesProvider;
@@ -104,7 +106,7 @@
showPreInit = new JCheckBox();
sortByLabel = new JLabel();
regExLabel = new JCheckBox();
- sortBy = new JComboBox();
+ sortBy = new JComboBox<>();
searchLabel = new JLabel();
autorefresh = new JCheckBox();
refresh = new JButton();
@@ -313,7 +315,6 @@
statistics.setText(model.createStatisticHint());
}
- @SuppressWarnings("unchecked")
private void initComponents() {
//this is crucial, otherwie PlainDocument implementatin is repalcing all \n by space
((PlainDocument)regExFilter.getDocument()).getDocumentProperties().remove("filterNewlines");
@@ -380,7 +381,7 @@
regExLabel.setText(Translator.R("COPregex") + ":");
regExLabel.addActionListener(getDefaultActionSingleton());
- sortBy.setModel(new DefaultComboBoxModel(new String[] {
+ sortBy.setModel(new DefaultComboBoxModel<>(new String[] {
Translator.R("COPAsArrived"),
Translator.R("COPuser"),
Translator.R("COPorigin"),
@@ -961,7 +962,7 @@
private final JCheckBox showThread2;
private final JCheckBox showUser;
private final JCheckBox sortCopyAll;
- private final JComboBox sortBy;
+ private final JComboBox<String> sortBy;
private final JLabel sortByLabel;
private final JLabel statistics;
private final JCheckBox wordWrap;
--- netx/net/sourceforge/nanoxml/XMLElement.java 2014-04-02 06:20:59.669124000 -0400
+++ netx/net/sourceforge/nanoxml/XMLElement.java 2014-05-15 16:57:20.000000000 -0400
@@ -39,7 +39,7 @@
/**
* XMLElement is a representation of an XML object. The object is able to parse
* XML code.
- * <p><dl>
+ * <dl>
* <dt><b>Parsing XML Data</b></dt>
* <dd>
* You can parse XML data using the following code:
@@ -83,7 +83,6 @@
* {@link #createAnotherElement() createAnotherElement}
* which has to return a new copy of the receiver.
* </dd></dl>
- * </p>
*
* @see net.sourceforge.nanoxml.XMLParseException
*
@@ -178,7 +177,8 @@
private boolean ignoreWhitespace;
/**
- * Character read too much.<br/>
+ * Character read too much.
+ * <p>
* This character provides push-back functionality to the input reader
* without having to use a PushbackReader.
* If there is no such character, this field is {@code '\0'}.
@@ -210,7 +210,8 @@
private int parserLineNr;
/**
- * Creates and initializes a new XML element.<br/>
+ * Creates and initializes a new XML element.
+ * <p>
* Calling the construction is equivalent to:
* <ul><li>{@code new XMLElement(new Hashtable(), false, true)}</li></ul>
*
@@ -400,7 +401,8 @@
}
/**
- * Returns an attribute of the element.<br/>
+ * Returns an attribute of the element.
+ * <p>
* If the attribute doesn't exist, {@code null} is returned.
*
* @param name The name of the attribute.
@@ -535,7 +537,7 @@
* The new name.
*
* <dl><dt><b>Preconditions:</b></dt><dd>
- * <ul><li{@code name != null}</li>
+ * <ul><li>{@code name != null}</li>
* <li>{@code name} is a valid XML identifier</li>
* </ul></dd></dl>
*/
@@ -597,7 +599,8 @@
}
/**
- * This method scans an identifier from the current reader.<br/>
+ * This method scans an identifier from the current reader.
+ * <p>
* The scanned whitespace is appended to {@code result}.
*
* @return the next character following the whitespace.
@@ -625,7 +628,8 @@
}
/**
- * This method scans a delimited string from the current reader.<br/>
+ * This method scans a delimited string from the current reader.
+ * <p>
* The scanned string without delimiters is appended to {@code string}.
*
* <dl><dt><b>Preconditions:</b></dt><dd>
@@ -653,8 +657,10 @@
/**
* Scans a {@code #PCDATA} element. CDATA sections and entities are
- * resolved.<br/>
- * The next < char is skipped.<br/>
+ * resolved.
+ * <p>
+ * The next < char is skipped.
+ * <p>
* The scanned data is appended to {@code data}.
*
* <dl><dt><b>Preconditions:</b></dt><dd>
@@ -831,7 +837,8 @@
}
/**
- * Scans the data for literal text.<br/>
+ * Scans the data for literal text.
+ * <p>
* Scanning stops when a character does not match or after the complete
* text has been checked, whichever comes first.
*
@@ -985,7 +992,8 @@
}
/**
- * Resolves an entity. The name of the entity is read from the reader.<br/>
+ * Resolves an entity. The name of the entity is read from the reader.
+ * <p>
* The value of the entity is appended to {@code buf}.
*
* @param buf Where to put the entity value.
--- netx/net/sourceforge/nanoxml/XMLParseException.java 2014-04-02 06:20:59.669124000 -0400
+++ netx/net/sourceforge/nanoxml/XMLParseException.java 2014-05-15 16:57:20.000000000 -0400
@@ -32,7 +32,8 @@
* An XMLParseException is thrown when an error occures while parsing an XML
* string.
* <p>
- * $Revision: 1.1 $<br/>
+ * $Revision: 1.1 $</p>
+ * <p>
* $Date: 2002/08/03 04:05:32 $</p>
*
* @see net.sourceforge.nanoxml.XMLElement
--- plugin/icedteanp/IcedTeaNPPlugin.cc 2014-04-02 06:20:59.687125000 -0400
+++ plugin/icedteanp/IcedTeaNPPlugin.cc 2014-05-15 16:57:20.000000000 -0400
@@ -64,16 +64,16 @@
#define PLUGIN_FULL_NAME PLUGIN_NAME " (using " PLUGIN_VERSION ")"
#define PLUGIN_DESC "The <a href=\"" PACKAGE_URL "\">" PLUGIN_NAME "</a> executes Java applets."
-#ifdef HAVE_JAVA7
- #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION
- #define PLUGIN_APPLET_MIME_DESC7 \
- "application/x-java-applet;version=1.7:class,jar:IcedTea;"
- #define PLUGIN_BEAN_MIME_DESC7 \
- "application/x-java-bean;version=1.7:class,jar:IcedTea;"
+#ifdef HAVE_JAVA8
+ #define JPI_VERSION "1.8.0_" JDK_UPDATE_VERSION
+ #define PLUGIN_APPLET_MIME_DESC \
+ "application/x-java-applet;version=1.8:class,jar:IcedTea;"
+ #define PLUGIN_BEAN_MIME_DESC \
+ "application/x-java-bean;version=1.8:class,jar:IcedTea;"
#else
- #define JPI_VERSION "1.6.0_" JDK_UPDATE_VERSION
- #define PLUGIN_APPLET_MIME_DESC7
- #define PLUGIN_BEAN_MIME_DESC7
+ #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION
+ #define PLUGIN_APPLET_MIME_DESC
+ #define PLUGIN_BEAN_MIME_DESC
#endif
#define PLUGIN_MIME_DESC \
@@ -93,7 +93,8 @@
"application/x-java-applet;version=1.4.2:class,jar:IcedTea;" \
"application/x-java-applet;version=1.5:class,jar:IcedTea;" \
"application/x-java-applet;version=1.6:class,jar:IcedTea;" \
- PLUGIN_APPLET_MIME_DESC7 \
+ "application/x-java-applet;version=1.7:class,jar:IcedTea;" \
+ PLUGIN_APPLET_MIME_DESC \
"application/x-java-applet;jpi-version=" JPI_VERSION ":class,jar:IcedTea;" \
"application/x-java-bean:class,jar:IcedTea;" \
"application/x-java-bean;version=1.1:class,jar:IcedTea;" \
@@ -110,7 +111,8 @@
"application/x-java-bean;version=1.4.2:class,jar:IcedTea;" \
"application/x-java-bean;version=1.5:class,jar:IcedTea;" \
"application/x-java-bean;version=1.6:class,jar:IcedTea;" \
- PLUGIN_BEAN_MIME_DESC7 \
+ "application/x-java-bean;version=1.7:class,jar:IcedTea;" \
+ PLUGIN_BEAN_MIME_DESC \
"application/x-java-bean;jpi-version=" JPI_VERSION ":class,jar:IcedTea;" \
"application/x-java-vm-npruntime::IcedTea;"
|