Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions nbi/engine/src/org/netbeans/installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void finish() {
final Object prop = System.getProperties().get(EXIT_CODE_PROPERTY);
if ( prop!= null && prop instanceof Integer) {
try {
exitCode = ((Integer)prop).intValue();
exitCode = (Integer) prop;
} catch (NumberFormatException e) {
LogManager.log("... cannot parse exit code : " + prop, e);
}
Expand Down Expand Up @@ -250,9 +250,7 @@ private void exitNormally(int errorCode) {
private void exitImmediately(int errorCode) {
if (Boolean.getBoolean(DONT_USE_SYSTEM_EXIT_PROPERTY) &&
(errorCode != CRITICAL_ERRORCODE)) {
System.getProperties().put(
EXIT_CODE_PROPERTY,
Integer.valueOf(errorCode));
System.getProperties().put(EXIT_CODE_PROPERTY, errorCode);
} else {
System.exit(errorCode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void setBackgroundImage(ImageIcon backgroundImage, int anchor) {
}
public ImageIcon getBackgroundImage(int anchor) {
for(Pair <Integer, ImageIcon> pair : images) {
if(pair.getFirst().intValue() == anchor) {
if(pair.getFirst() == anchor) {
return pair.getSecond();
}
}
Expand All @@ -82,7 +82,7 @@ protected void paintComponent(Graphics graphics) {
super.paintComponent(graphics);

for(Pair <Integer, ImageIcon> pair : images){
final int anchor = pair.getFirst().intValue();
final int anchor = pair.getFirst();
Image backgroundImage = pair.getSecond().getImage();
if (backgroundImage != null) {
switch(anchor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1255,9 +1255,9 @@ private void setPermissionsJ(String path, int mode, int change) throws IOExcepti
if(mode==0) return;
String fullmode = StringUtils.EMPTY_STRING;

Integer [] rModes = new Integer [] {FileAccessMode.RU, FileAccessMode.RG, FileAccessMode.RO };
Integer [] wModes = new Integer [] {FileAccessMode.WU, FileAccessMode.WG, FileAccessMode.WO };
Integer [] xModes = new Integer [] {FileAccessMode.EU, FileAccessMode.EG, FileAccessMode.EO };
Integer [] rModes = {FileAccessMode.RU, FileAccessMode.RG, FileAccessMode.RO };
Integer [] wModes = {FileAccessMode.WU, FileAccessMode.WG, FileAccessMode.WO };
Integer [] xModes = {FileAccessMode.EU, FileAccessMode.EG, FileAccessMode.EO };

List <Pair <List <Integer>, String >> modes = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ private void addData(FileOutputStream fos, List <String> strings, boolean isUnic
private void addData(FileOutputStream fos, String [] strings, boolean isUnicode) throws IOException {

if(strings!=null) {
addNumber(fos, Integer.valueOf(strings.length).longValue()); // number of array elements
addNumber(fos, strings.length); // number of array elements
for(String s: strings) {
addData(fos, s, isUnicode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ public void execute() {
}
// do not override already set exit code
if (System.getProperties().get(Installer.EXIT_CODE_PROPERTY) == null) {
System.getProperties().put(Installer.EXIT_CODE_PROPERTY,
Integer.valueOf(INSTALLATION_ERROR_CODE));
System.getProperties().put(Installer.EXIT_CODE_PROPERTY, INSTALLATION_ERROR_CODE);
}
// adjust the product's status and save this error - it will
// be reused later at the PostInstallSummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ public void execute() {
} catch (UninstallationException e) {
// do not override already set exit code
if (System.getProperties().get(Installer.EXIT_CODE_PROPERTY) == null) {
System.getProperties().put(Installer.EXIT_CODE_PROPERTY,
Integer.valueOf(UNINSTALLATION_ERROR_CODE));
System.getProperties().put(Installer.EXIT_CODE_PROPERTY, UNINSTALLATION_ERROR_CODE);
}
// adjust the component's status and save this error - it will
// be reused later at the PostInstallSummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,14 +768,14 @@ public String generateComponentsJs(

// groups
for (int i = 0; i < productUids.size(); i++) {
defaultGroupProducts.add(Integer.valueOf(i));
defaultGroupProducts.add(i);
}

for (Group group: groups) {
List<Integer> components = new LinkedList<Integer>();
for (int i = 0; i < products.size(); i++) {
if (products.get(i).getParent().equals(group)) {
Integer index = Integer.valueOf(productMapping.get(i));
Integer index = productMapping.get(i);
if (!components.contains(index)) {
components.add(index);
defaultGroupProducts.remove(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re


for (int i = 0; i < productUids.size(); i++) {
defaultGroupProducts.add(Integer.valueOf(i));
defaultGroupProducts.add(i);
}

for (Group group: groups) {
Expand All @@ -270,7 +270,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
List<Integer> components = new LinkedList<Integer>();
for (int i = 0; i < products.size(); i++) {
if (group.isAncestor(products.get(i))) {
Integer index = Integer.valueOf(productMapping.get(i));
Integer index = productMapping.get(i);
if (!components.contains(index)) {
components.add(index);
defaultGroupProducts.remove(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
out.println();

for (int i = 0; i < productUids.size(); i++) {
defaultGroupProducts.add(Integer.valueOf(i));
defaultGroupProducts.add(i);
}

for (Group group: groups) {
List<Integer> components = new LinkedList<Integer>();
for (int i = 0; i < products.size(); i++) {
if (products.get(i).getParent().equals(group)) {
Integer index = Integer.valueOf(productMapping.get(i));
Integer index = productMapping.get(i);
if (!components.contains(index)) {
components.add(index);
defaultGroupProducts.remove(index);
Expand Down