mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
2004-05-18 Alain Magloire
Remove warnings and compatibility plugin to be full Eclipse-3.0 compliant.
This commit is contained in:
parent
a8037dbc3a
commit
0a0eb69d98
17 changed files with 84 additions and 70 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-05-18 Alain Magloire
|
||||
|
||||
Remove warnings and compatibility plugin
|
||||
to be full Eclipse-3.0 compliant.
|
||||
|
||||
2004-05-11 Alain Magloire
|
||||
|
||||
Preliminary work to get Parser IProblem in the CEditor.
|
||||
|
|
|
@ -71,7 +71,7 @@ public class UpdateDependency implements IJob {
|
|||
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||
indexManager.performConcurrentJob(
|
||||
new PatternSearchJob(
|
||||
(CSearchPattern) pattern,
|
||||
pattern,
|
||||
scope,
|
||||
pathCollector,
|
||||
indexManager
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.eclipse.cdt.core.model.CModelException;
|
|||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.ElementChangedEvent;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICModel;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
@ -87,7 +86,7 @@ public class BinaryRunner {
|
|||
ICElement[] children = container.getChildren();
|
||||
if (children.length > 0) {
|
||||
CModelManager factory = CModelManager.getDefault();
|
||||
ICElement root = (ICModel) factory.getCModel();
|
||||
ICElement root = factory.getCModel();
|
||||
CElementDelta cdelta = new CElementDelta(root);
|
||||
cdelta.added(cproject);
|
||||
cdelta.added(container);
|
||||
|
|
|
@ -497,7 +497,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
if (core == null) {
|
||||
return null;
|
||||
}
|
||||
IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
for (int i = 0; i < extensions.length; i++) {
|
||||
|
@ -565,6 +565,11 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
}
|
||||
|
||||
public void saveRawPathEntries(ICProject cproject, IPathEntry[] entries) throws CModelException {
|
||||
// sanity
|
||||
if (entries == null) {
|
||||
entries = NO_PATHENTRIES;
|
||||
}
|
||||
|
||||
ArrayList list = new ArrayList(entries.length);
|
||||
IPath projectPath = cproject.getPath();
|
||||
for (int i = 0; i < entries.length; i++) {
|
||||
|
@ -787,7 +792,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
return null;
|
||||
}
|
||||
ArrayList containerIDList = new ArrayList(5);
|
||||
IExtensionPoint extension = core.getDescriptor().getExtensionPoint(CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CONTAINER_INITIALIZER_EXTPOINT_ID);
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
for (int i = 0; i < extensions.length; i++) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<requires>
|
||||
<import plugin="org.eclipse.core.resources"/>
|
||||
<import plugin="org.eclipse.team.core"/>
|
||||
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
||||
<import plugin="org.eclipse.core.runtime"/>
|
||||
</requires>
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
|||
import org.eclipse.cdt.internal.core.search.indexing.SourceIndexer;
|
||||
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
||||
import org.eclipse.cdt.internal.core.search.processing.JobManager;
|
||||
import org.eclipse.core.boot.BootLoader;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
|
@ -49,7 +48,6 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IPluginDescriptor;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
@ -59,6 +57,7 @@ import org.eclipse.core.runtime.Plugin;
|
|||
import org.eclipse.core.runtime.Preferences;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
public class CCorePlugin extends Plugin {
|
||||
|
||||
|
@ -216,34 +215,37 @@ public class CCorePlugin extends Plugin {
|
|||
|
||||
// ------ CPlugin
|
||||
|
||||
public CCorePlugin(IPluginDescriptor descriptor) {
|
||||
super(descriptor);
|
||||
public CCorePlugin() {
|
||||
super();
|
||||
fgCPlugin = this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Plugin#shutdown
|
||||
*/
|
||||
public void shutdown() throws CoreException {
|
||||
if (fDescriptorManager != null) {
|
||||
fDescriptorManager.shutdown();
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
try {
|
||||
if (fDescriptorManager != null) {
|
||||
fDescriptorManager.shutdown();
|
||||
}
|
||||
|
||||
if (fCoreModel != null) {
|
||||
fCoreModel.shutdown();
|
||||
}
|
||||
|
||||
if (cdtLog != null) {
|
||||
cdtLog.shutdown();
|
||||
}
|
||||
} finally {
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
if (fCoreModel != null) {
|
||||
fCoreModel.shutdown();
|
||||
}
|
||||
|
||||
if (cdtLog != null) {
|
||||
cdtLog.shutdown();
|
||||
}
|
||||
super.shutdown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Plugin#startup
|
||||
*/
|
||||
public void startup() throws CoreException {
|
||||
super.startup();
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
|
||||
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
|
||||
|
||||
|
@ -464,7 +466,7 @@ public class CCorePlugin extends Plugin {
|
|||
|
||||
public IConsole getConsole(String id) {
|
||||
try {
|
||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("CBuildConsole"); //$NON-NLS-1$
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CBuildConsole"); //$NON-NLS-1$
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
for (int i = 0; i < extensions.length; i++) {
|
||||
|
@ -612,7 +614,7 @@ public class CCorePlugin extends Plugin {
|
|||
if (id == null || id.length() == 0) {
|
||||
id = DEFAULT_BINARY_PARSER_UNIQ_ID;
|
||||
}
|
||||
IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint(BINARY_PARSER_SIMPLE_ID);
|
||||
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, BINARY_PARSER_SIMPLE_ID);
|
||||
IExtension extension = extensionPoint.getExtension(id);
|
||||
if (extension != null) {
|
||||
IConfigurationElement element[] = extension.getConfigurationElements();
|
||||
|
@ -821,7 +823,7 @@ public class CCorePlugin extends Plugin {
|
|||
* @return IProcessList
|
||||
*/
|
||||
public IProcessList getProcessList() throws CoreException {
|
||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("ProcessList"); //$NON-NLS-1$
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "ProcessList"); //$NON-NLS-1$
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
IConfigurationElement defaultContributor = null;
|
||||
|
@ -834,7 +836,7 @@ public class CCorePlugin extends Plugin {
|
|||
if (defaultContributor == null) {
|
||||
defaultContributor = configElements[j];
|
||||
}
|
||||
} else if (platform.equals(BootLoader.getOS())) {
|
||||
} else if (platform.equals(Platform.getOS())) {
|
||||
// found explicit contributor for this platform.
|
||||
return (IProcessList) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -854,7 +856,7 @@ public class CCorePlugin extends Plugin {
|
|||
* @return
|
||||
*/
|
||||
public String[] getAllErrorParsersIDs() {
|
||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
|
||||
String[] empty = new String[0];
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
|
@ -870,7 +872,7 @@ public class CCorePlugin extends Plugin {
|
|||
public IErrorParser[] getErrorParser(String id) {
|
||||
IErrorParser[] empty = new IErrorParser[0];
|
||||
try {
|
||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(ERROR_PARSER_SIMPLE_ID);
|
||||
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, ERROR_PARSER_SIMPLE_ID);
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
List list = new ArrayList(extensions.length);
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.eclipse.cdt.core.filetype.ICLanguage;
|
|||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
/**
|
||||
* @author sam.robb
|
||||
|
@ -346,7 +347,7 @@ public class CFileTypeResolver implements ICFileTypeResolver {
|
|||
* @return the extension point, or null
|
||||
*/
|
||||
private IExtensionPoint getExtensionPoint(String extensionPointId) {
|
||||
return CCorePlugin.getDefault().getDescriptor().getExtensionPoint(extensionPointId);
|
||||
return Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, extensionPointId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,7 +407,8 @@ public class CFileTypeResolver implements ICFileTypeResolver {
|
|||
String line = null;
|
||||
|
||||
try {
|
||||
baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
|
||||
//baseURL = element.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
|
||||
baseURL = Platform.getBundle(element.getDeclaringExtension().getNamespace()).getEntry("/"); //$NON-NLS-1$
|
||||
fileURL = new URL(baseURL, attr);
|
||||
in = new BufferedReader(new InputStreamReader(fileURL.openStream()));
|
||||
line = in.readLine();
|
||||
|
|
|
@ -44,8 +44,8 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.IExtensionRegistry;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IPluginRegistry;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
@ -519,8 +519,8 @@ public class CDescriptor implements ICDescriptor {
|
|||
|
||||
protected ICExtension createExtensions(ICExtensionReference ext) throws CoreException {
|
||||
InternalCExtension cExtension = null;
|
||||
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
||||
IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
|
||||
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
|
||||
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
|
||||
IExtension extension = extensionPoint.getExtension(ext.getID());
|
||||
if (extension == null) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
||||
|
@ -539,8 +539,8 @@ public class CDescriptor implements ICDescriptor {
|
|||
}
|
||||
|
||||
protected IConfigurationElement[] getConfigurationElement(ICExtensionReference ext) throws CoreException {
|
||||
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
|
||||
IExtensionPoint extensionPoint = pluginRegistry.getExtensionPoint(ext.getExtension());
|
||||
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
|
||||
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ext.getExtension());
|
||||
IExtension extension = extensionPoint.getExtension(ext.getID());
|
||||
if (extension == null) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1,
|
||||
|
|
|
@ -182,7 +182,7 @@ public class CDescriptorManager implements ICDescriptorManager, IResourceChangeL
|
|||
}
|
||||
|
||||
private void initializeOwnerConfiguration() {
|
||||
IExtensionPoint extpoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint("CProject"); //$NON-NLS-1$
|
||||
IExtensionPoint extpoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CProject"); //$NON-NLS-1$
|
||||
IExtension extension[] = extpoint.getExtensions();
|
||||
fOwnerConfigMap = new HashMap(extension.length);
|
||||
for (int i = 0; i < extension.length; i++) {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.utils;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
/**
|
||||
|
|
|
@ -473,7 +473,8 @@ public class PE {
|
|||
ReadMemoryAccess memory = new ReadMemoryAccess(data, true);
|
||||
int idx = 0;
|
||||
try {
|
||||
Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
|
||||
//Exe.ExeHeader exeHdr = new Exe.ExeHeader(memory);
|
||||
new Exe.ExeHeader(memory);
|
||||
DOSHeader dosHdr = new DOSHeader(memory);
|
||||
// Jump the Coff header, and Check the sig.
|
||||
idx = dosHdr.e_lfanew;
|
||||
|
|
|
@ -127,7 +127,7 @@ public class Dwarf {
|
|||
sb.append(':');
|
||||
for (int i = 0; i < len; i++) {
|
||||
byte b = Array.getByte(value, i);
|
||||
sb.append(' ').append(Integer.toHexString((int) b));
|
||||
sb.append(' ').append(Integer.toHexString(b));
|
||||
}
|
||||
} else {
|
||||
if (value instanceof Number) {
|
||||
|
@ -506,7 +506,7 @@ public class Dwarf {
|
|||
|
||||
case DwarfConstants.DW_FORM_strp :
|
||||
{
|
||||
int offset = (int) read_4_bytes(in);
|
||||
int offset = read_4_bytes(in);
|
||||
byte[] data = (byte[]) dwarfSections.get(DWARF_DEBUG_STR);
|
||||
if (data == null) {
|
||||
obj = new String();
|
||||
|
|
|
@ -129,7 +129,7 @@ public class Stabs {
|
|||
}
|
||||
|
||||
public void parse(IDebugEntryRequestor requestor) {
|
||||
List list = new ArrayList();
|
||||
//List list = new ArrayList();
|
||||
long nstab = stabData.length / StabConstant.SIZE;
|
||||
int i, offset;
|
||||
String holder = null;
|
||||
|
@ -455,7 +455,7 @@ public class Stabs {
|
|||
String infoField = sf.getTypeInformation();
|
||||
// According to the doc 't' can follow the 'T'
|
||||
if (infoField.length() > 0 && infoField.charAt(0) == 't') {
|
||||
String s = infoField.substring(1);
|
||||
//String s = infoField.substring(1);
|
||||
parseStabString(requestor, field, value);
|
||||
} else {
|
||||
// Just register the type.
|
||||
|
@ -763,34 +763,34 @@ public class Stabs {
|
|||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
// get the width
|
||||
int width = 0;
|
||||
//int width = 0;
|
||||
while ((c = reader.read()) != -1) {
|
||||
if (c == ';') {
|
||||
break;
|
||||
}
|
||||
sb.append((char) c);
|
||||
}
|
||||
try {
|
||||
String token = sb.toString();
|
||||
width = Integer.parseInt(token);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
//try {
|
||||
// String token = sb.toString();
|
||||
// width = Integer.parseInt(token);
|
||||
//} catch (NumberFormatException e) {
|
||||
//}
|
||||
|
||||
sb.setLength(0);
|
||||
|
||||
// get the offset
|
||||
int offset = 0;
|
||||
//int offset = 0;
|
||||
while ((c = reader.read()) != -1) {
|
||||
if (c == ';') {
|
||||
break;
|
||||
}
|
||||
sb.append((char) c);
|
||||
}
|
||||
try {
|
||||
String token = sb.toString();
|
||||
offset = Integer.parseInt(token);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
//try {
|
||||
//String token = sb.toString();
|
||||
//offset = Integer.parseInt(token);
|
||||
//} catch (NumberFormatException e) {
|
||||
//}
|
||||
|
||||
sb.setLength(0);
|
||||
|
||||
|
@ -823,18 +823,18 @@ public class Stabs {
|
|||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
// get the fp-Type
|
||||
int fpType = 0;
|
||||
//int fpType = 0;
|
||||
while ((c = reader.read()) != -1) {
|
||||
if (c == ';') {
|
||||
break;
|
||||
}
|
||||
sb.append((char) c);
|
||||
}
|
||||
try {
|
||||
String token = sb.toString();
|
||||
fpType = Integer.parseInt(token);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
//try {
|
||||
// String token = sb.toString();
|
||||
//fpType = Integer.parseInt(token);
|
||||
//} catch (NumberFormatException e) {
|
||||
//}
|
||||
|
||||
sb.setLength(0);
|
||||
|
||||
|
@ -858,7 +858,8 @@ public class Stabs {
|
|||
case 'c' :
|
||||
case 'g' :
|
||||
{
|
||||
DebugType type = parseStabType(name, reader);
|
||||
//DebugType type = parseStabType(name, reader);
|
||||
parseStabType(name, reader);
|
||||
int c = reader.read(); // semicolon
|
||||
StringBuffer sb = new StringBuffer();
|
||||
int nbits = 0;
|
||||
|
@ -885,7 +886,8 @@ public class Stabs {
|
|||
// we only understand range for an array.
|
||||
int c = reader.read();
|
||||
if (c == 'r') {
|
||||
DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
|
||||
//DebugType index_type = parseStabType("", reader); //$NON-NLS-1$
|
||||
parseStabType("", reader); //$NON-NLS-1$
|
||||
|
||||
c = reader.read();
|
||||
// Check ';'
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
package org.eclipse.cdt.utils.debug.tools;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
@ -302,7 +301,7 @@ public class DebugDump implements IDebugEntryRequestor {
|
|||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
//ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
DebugDump dump = new DebugDump(System.out);
|
||||
dump.parse(args[0]);
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -350,7 +350,7 @@ public class Elf {
|
|||
} else if ( obj instanceof Long ) {
|
||||
Long val = (Long)obj;
|
||||
anotherVal = val.longValue();
|
||||
thisVal = (long)this.st_value;
|
||||
thisVal = this.st_value;
|
||||
}
|
||||
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
|
||||
}
|
||||
|
@ -1028,7 +1028,7 @@ public class Elf {
|
|||
tmp[1] = (short)((val >> 8) & 0x00ff);
|
||||
tmp[2] = (short)((val >> 16) & 0x00ff);
|
||||
tmp[3] = (short)((val >> 24) & 0x00ff);
|
||||
return (long)((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
|
||||
return ((tmp[0] << 24) + (tmp[1] << 16) + (tmp[2] << 8) + tmp[3]);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class PTYInputStream extends InputStream {
|
|||
byte b[] = new byte[1];
|
||||
if (1 != read(b, 0, 1))
|
||||
return -1;
|
||||
return (int) b[0];
|
||||
return b[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@ class SpawnerInputStream extends InputStream {
|
|||
byte b[] = new byte[1];
|
||||
if (1 != read(b, 0, 1))
|
||||
return -1;
|
||||
return (int) b[0];
|
||||
return b[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue