Jump to: navigation, search

Difference between revisions of "Hudson-ci/Planning/Library Cleanup"

(JavaBeans Activation Framework)
 
(5 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
Hudson uses a patched version of activation.jar derived from '''git://github.com/kohsuke/javax.activation.git'''  
 
Hudson uses a patched version of activation.jar derived from '''git://github.com/kohsuke/javax.activation.git'''  
  
The home of the base project is now the GlassFish Project: '''https://svn.java.net/svn/glassfish~svn/trunk/external/modules/activation'''  
+
The home of the base project version compared below is now the GlassFish Project: '''https://svn.java.net/svn/glassfish~svn/trunk/external/modules/activation'''  
  
 
=== Tracking  ===
 
=== Tracking  ===
Line 17: Line 17:
 
This project is tracked by BugZilla: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=364988 364988]
 
This project is tracked by BugZilla: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=364988 364988]
  
=== Diffs  ===
+
=== JAF Diffs  ===
  
 
By package / source file:  
 
By package / source file:  
Line 27: Line 27:
 
DataContentHandler.java  
 
DataContentHandler.java  
  
{| width="80%" border="1" cellpadding="1" cellspacing="1" summary="Codebase Diffs"
+
{| width="200px" border="1" cellpadding="1" cellspacing="1" summary="Codebase Diffs"
 
|-
 
|-
 
| '''Package'''  
 
| '''Package'''  
Line 36: Line 36:
 
| '''Hudson'''
 
| '''Hudson'''
 
|-
 
|-
| com.sun.<br>activation.registries  
+
| com.sun.<br>activation.<br>registries  
 
| <strike>LogSupport.java</strike>  
 
| <strike>LogSupport.java</strike>  
 
|  
 
|  
Line 46: Line 46:
 
| MailcapFile.java  
 
| MailcapFile.java  
 
| 1  
 
| 1  
| public String[] getNativeCommands(String mime_type)  
+
| public String[] getNativeCommands( String mime_type)  
 
| List v = (List)native_commands.get(<br>mime_type.toLowerCase());  
 
| List v = (List)native_commands.get(<br>mime_type.toLowerCase());  
 
| List v =<br> (List)native_commands.get(<br>mime_type.toLowerCase('''Locale.ENGLISH'''));
 
| List v =<br> (List)native_commands.get(<br>mime_type.toLowerCase('''Locale.ENGLISH'''));
Line 72: Line 72:
 
|-
 
|-
 
|  
 
|  
| <strike>MailcapParseException.java</strike>  
+
| <strike>MailcapParseException<br>.java</strike>  
 
|  
 
|  
 
|  
 
|  
Line 95: Line 95:
 
|  
 
|  
 
| 3  
 
| 3  
| public static boolean isAutoquoteSpecialChar(char c)  
+
| public static boolean isAutoquoteSpecialChar( char c)  
 
|  
 
|  
 
| '''Function Not Present'''
 
| '''Function Not Present'''
Line 114: Line 114:
 
|-
 
|-
 
|  
 
|  
com.sun.<br>activation.viewers  
+
com.sun.<br>activation.<br>viewers  
  
 
| <strike>ImageViewer.java</strike>  
 
| <strike>ImageViewer.java</strike>  
Line 132: Line 132:
 
| TextEditor.java  
 
| TextEditor.java  
 
| 1  
 
| 1  
| public void setInputStream(InputStream ins)  
+
| public void <br>setInputStream<br>(InputStream ins)  
 
| // make sure we got one<br> if(fos == null) {<br> System.out.println("Invalid outputstream in TextEditor!");<br> System.out.println("not saving!");<br> }  
 
| // make sure we got one<br> if(fos == null) {<br> System.out.println("Invalid outputstream in TextEditor!");<br> System.out.println("not saving!");<br> }  
 
| // make sure we got one<br> if(fos == null) {<br> System.out.println("Invalid outputstream in TextEditor!");<br> System.out.println("not saving!");<br> '''return;'''<br> }
 
| // make sure we got one<br> if(fos == null) {<br> System.out.println("Invalid outputstream in TextEditor!");<br> System.out.println("not saving!");<br> '''return;'''<br> }
Line 143: Line 143:
 
|  
 
|  
 
|-
 
|-
| javax.activation  
+
| javax.<br>activation  
 
| ActivationDataFlavor.java  
 
| ActivationDataFlavor.java  
 
| 1  
 
| 1  
Line 179: Line 179:
 
|-
 
|-
 
|  
 
|  
| <strike>DataContentHandlerFactory.java</strike>  
+
| <strike>DataContentHandlerFactory<br>.java</strike>  
 
|  
 
|  
 
|  
 
|  
Line 195: Line 195:
 
|  
 
|  
 
| 2  
 
| 2  
| Object getTransferData(DataFlavor df, DataSource ds)  
+
| Object getTransferData( DataFlavor df, DataSource ds)  
 
| else if (df.equals(transferFlavors[0])) // only have one now  
 
| else if (df.equals(transferFlavors[0])) // only have one now  
 
| else if (df.equals('''getTransferDataFlavors()'''[0])) // only have one now
 
| else if (df.equals('''getTransferDataFlavors()'''[0])) // only have one now
Line 225: Line 225:
 
|  
 
|  
 
|  
 
|  
| <br>
+
|  
 
|-
 
|-
 
|  
 
|  
| MailcapCommandMap.java  
+
| MailcapCommandMap<br>.java  
 
| 1  
 
| 1  
| public synchronized CommandInfo[] getPreferredCommands(String mimeType)  
+
| public synchronized CommandInfo[] getPreferredCommands (String mimeType)  
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
Line 244: Line 244:
 
|  
 
|  
 
| 3  
 
| 3  
| public synchronized DataContentHandler createDataContentHandler(String mimeType)  
+
| public synchronized DataContentHandler createDataContentHandler<br>(String mimeType)  
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
Line 254: Line 254:
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase();  
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
 
| mimeType = mimeType.toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
| MimeType.java
 +
| 1
 +
| public MimeType(String primary, String sub)
 +
| primaryType = primary.toLowerCase();
 +
| primaryType = primary.toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 2
 +
| public MimeType(String primary, String sub)
 +
| subType= sub.toLowerCase();
 +
| subType= sub.toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 3
 +
| private void parse(String rawdata)
 +
| primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase();
 +
| primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 4
 +
| private void parse(String rawdata)
 +
| subType = rawdata.substring(slashIndex + 1).trim().toLowerCase();
 +
| subType = rawdata.substring(slashIndex + 1).trim().toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 5
 +
| private void parse(String rawdata)
 +
| primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase();
 +
| primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 6
 +
| private void parse(String rawdata)
 +
| subType = rawdata.substring(slashIndex + 1,semIndex).trim().toLowerCase();
 +
| subType = rawdata.substring(slashIndex + 1,semIndex).trim().toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 7
 +
| public void setPrimaryType(String primary)
 +
| primaryType = primary.toLowerCase();
 +
| primaryType = primary.toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 8
 +
| public void setSubType( String sub)
 +
| subType = sub.toLowerCase();
 +
| subType = sub.toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
| MimeTypeParameterList<br>.java
 +
| 1
 +
| protected void parse(String parameterList)
 +
| name = parameterList.substring(lastIndex, i).toLowerCase();
 +
| name = parameterList.substring(lastIndex, i).toLowerCase('''Locale.ENGLISH''');
 +
|-
 +
|
 +
|
 +
| 2
 +
| public String get(String name)
 +
| return (String)parameters.get(name.trim().toLowerCase());
 +
| return (String)parameters.get(name.trim().toLowerCase('''Locale.ENGLISH'''));
 +
|-
 +
|
 +
|
 +
| 3
 +
| public void set(String name, String value)
 +
| parameters.put(name.trim().toLowerCase(), value);
 +
| parameters.put(name.trim().toLowerCase('''Locale.ENGLISH'''), value);
 +
|-
 +
|
 +
|
 +
| 4
 +
| public void remove(String name)
 +
| parameters.remove(name.trim().toLowerCase());
 +
| parameters.remove(name.trim().toLowerCase('''Locale.ENGLISH'''));
 +
|-
 +
|
 +
| <strike>MimeTypeParseException<br>.java</strike>
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|
 +
| <strike>MimetypesFileTypeMap<br>.java</strike>
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|
 +
| <strike>SecuritySupport<br>.java</strike>
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|
 +
| <strike>UnsupportedDataType<br>Exception.java</strike>
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|
 +
| <strike>URLDataSource.java</strike>
 +
|
 +
|
 +
|
 +
|
 
|}
 
|}
  
Line 268: Line 387:
 
This project is tracked by BugZilla:
 
This project is tracked by BugZilla:
  
=== Diffs ===
+
=== Diffs ===
 +
 
 +
The issues tracking the diffs on Codehaus are:
  
The issues tracking the diffs on Codehaus are:
+
*http://jira.codehaus.org/browse/XSTR-676  
http://jira.codehaus.org/browse/XSTR-676
+
*http://jira.codehaus.org/browse/XSTR-675  
http://jira.codehaus.org/browse/XSTR-675
+
*http://jira.codehaus.org/browse/XSTR-674
http://jira.codehaus.org/browse/XSTR-674
+

Latest revision as of 08:37, 1 December 2011

Hudson Continuous Integration Server
Website
Download
Community
Mailing ListForumsIRC
Bugzilla
Open
Help Wanted
Bug Day
Contribute
Browse Source
Hudson-bust.png Library Cleanup Project











Introduction

One of the major problems with the original Hudson code-base was the use of several of forked / patched 3rd party libraries. It's in no-one's interest to have to maintain separate code-bases in these cases and so we need to look at contributing any patches back to the original projects and removing the dependency on the patched versions This page tracks the libraries that we need to concentrate on as part of this process

JavaBeans Activation Framework

Hudson uses a patched version of activation.jar derived from git://github.com/kohsuke/javax.activation.git

The home of the base project version compared below is now the GlassFish Project: https://svn.java.net/svn/glassfish~svn/trunk/external/modules/activation

Tracking

This project is related to CQ: 5774

This project is tracked by BugZilla: 364988

JAF Diffs

By package / source file:

Strikethrough indicates no significant diffs apart from comments / copyright. Bold used to indicate simple code change within a statement.


DataContentHandler.java

Package Class Diff Function Origional (1.1 JAF) Hudson
com.sun.
activation.
registries
LogSupport.java
MailcapFile.java 1 public String[] getNativeCommands( String mime_type) List v = (List)native_commands.get(
mime_type.toLowerCase());
List v =
(List)native_commands.get(
mime_type.toLowerCase(Locale.ENGLISH));
2 protected void parseLine(String mailcapEntry) String primaryType = tokenizer.getCurrentTokenValue().toLowerCase(); String primaryType =
tokenizer.getCurrentTokenValue().toLowerCase(Locale.ENGLISH);
3 subType = tokenizer.getCurrentTokenValue().toLowerCase(); subType =
tokenizer.getCurrentTokenValue().toLowerCase(Locale.ENGLISH);
String paramName =
tokenizer.getCurrentTokenValue().toLowerCase();
String paramName = tokenizer.getCurrentTokenValue().
toLowerCase(Locale.ENGLISH);
MailcapParseException
.java
MailcapTokenizer.java 1 public void setAutoquoteChar(char value)
Function Not Present
2 public int nextToken() if (isAutoquoting) {
if (!isAutoquoteSpecialChar(c)) {
processAutoquoteToken();
} else if ((c == ';') || (c == '=')) {
currentToken = c;
currentTokenValue = new Character(c).toString();
++dataIndex;
} else {
currentToken = UNKNOWN_TOKEN;
currentTokenValue = new Character(c).toString();
++dataIndex;
}
if (isAutoquoting) {
if (c == ';' || c == '=') {
currentToken = c;
currentTokenValue = new Character(c).toString();
++dataIndex;
} else {
processAutoquoteToken();
}
3 public static boolean isAutoquoteSpecialChar( char c) Function Not Present
MimeTypeEntry.java
MimeTypeFile.java

com.sun.
activation.
viewers

ImageViewer.java
ImageViewerCanvas.java
TextEditor.java 1 public void
setInputStream
(InputStream ins)
// make sure we got one
if(fos == null) {
System.out.println("Invalid outputstream in TextEditor!");
System.out.println("not saving!");
}
// make sure we got one
if(fos == null) {
System.out.println("Invalid outputstream in TextEditor!");
System.out.println("not saving!");
return;
}
TextViewer.java
javax.
activation
ActivationDataFlavor.java 1 public boolean isMimeTypeEqual(String mimeType) } catch (MimeTypeParseException e) {} } catch (MimeTypeParseException e) {
// something didn't parse, do a crude comparison
return this.mimeType.equalsIgnoreCase(mimeType);

}
CommandInfo.java
CommandMap.java
CommandObject.java
DataContentHandler.java
DataContentHandlerFactory
.java
DataHandler.java 1 public DataFlavor[] getTransferDataFlavors() public DataFlavor[] getTransferDataFlavors() public synchronized DataFlavor[] getTransferDataFlavors()
2 Object getTransferData( DataFlavor df, DataSource ds) else if (df.equals(transferFlavors[0])) // only have one now else if (df.equals(getTransferDataFlavors()[0])) // only have one now
3 public void writeTo(Object obj, String mimeType, OutputStream os) if (dch != null)
dch.writeTo(obj, mimeType, os);
else
throw new UnsupportedDataTypeException(
if (dch != null)
dch.writeTo(obj, mimeType, os);
else if (obj instanceof byte[])
os.write((byte[])obj);
else if (obj instanceof String) {
OutputStreamWriter osw = new OutputStreamWriter(os);
osw.write((String)obj);
osw.flush();

} else
throw new UnsupportedDataTypeException(
DataSource.java
FileDataSource.java
FileTypeMap.java
MailcapCommandMap
.java
1 public synchronized CommandInfo[] getPreferredCommands (String mimeType) mimeType = mimeType.toLowerCase(); mimeType = mimeType.toLowerCase(Locale.ENGLISH);
2 public synchronized CommandInfo[] getAllCommands(String mimeType) mimeType = mimeType.toLowerCase(); mimeType = mimeType.toLowerCase(Locale.ENGLISH);
3 public synchronized DataContentHandler createDataContentHandler
(String mimeType)
mimeType = mimeType.toLowerCase(); mimeType = mimeType.toLowerCase(Locale.ENGLISH);
4 public synchronized String[] getNativeCommands(String mimeType) mimeType = mimeType.toLowerCase(); mimeType = mimeType.toLowerCase(Locale.ENGLISH);
MimeType.java 1 public MimeType(String primary, String sub) primaryType = primary.toLowerCase(); primaryType = primary.toLowerCase(Locale.ENGLISH);
2 public MimeType(String primary, String sub) subType= sub.toLowerCase(); subType= sub.toLowerCase(Locale.ENGLISH);
3 private void parse(String rawdata) primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase(); primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase(Locale.ENGLISH);
4 private void parse(String rawdata) subType = rawdata.substring(slashIndex + 1).trim().toLowerCase(); subType = rawdata.substring(slashIndex + 1).trim().toLowerCase(Locale.ENGLISH);
5 private void parse(String rawdata) primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase(); primaryType = rawdata.substring(0, slashIndex).trim().toLowerCase(Locale.ENGLISH);
6 private void parse(String rawdata) subType = rawdata.substring(slashIndex + 1,semIndex).trim().toLowerCase(); subType = rawdata.substring(slashIndex + 1,semIndex).trim().toLowerCase(Locale.ENGLISH);
7 public void setPrimaryType(String primary) primaryType = primary.toLowerCase(); primaryType = primary.toLowerCase(Locale.ENGLISH);
8 public void setSubType( String sub) subType = sub.toLowerCase(); subType = sub.toLowerCase(Locale.ENGLISH);
MimeTypeParameterList
.java
1 protected void parse(String parameterList) name = parameterList.substring(lastIndex, i).toLowerCase(); name = parameterList.substring(lastIndex, i).toLowerCase(Locale.ENGLISH);
2 public String get(String name) return (String)parameters.get(name.trim().toLowerCase()); return (String)parameters.get(name.trim().toLowerCase(Locale.ENGLISH));
3 public void set(String name, String value) parameters.put(name.trim().toLowerCase(), value); parameters.put(name.trim().toLowerCase(Locale.ENGLISH), value);
4 public void remove(String name) parameters.remove(name.trim().toLowerCase()); parameters.remove(name.trim().toLowerCase(Locale.ENGLISH));
MimeTypeParseException
.java
MimetypesFileTypeMap
.java
SecuritySupport
.java
UnsupportedDataType
Exception.java
URLDataSource.java

Xstream XML Parser

Husdon uses a patched version of xstream:

The home of the base project is on Codehaus: http://svn.codehaus.org/xstream/trunk/

Tracking

This project is related to CQ: 5771

This project is tracked by BugZilla:

Diffs

The issues tracking the diffs on Codehaus are: